diff --git a/po/ro.po b/po/ro.po index 33b56d8efca7..4bc76f203552 100644 --- a/po/ro.po +++ b/po/ro.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: Comprehensive Rust 🦀\n" -"POT-Creation-Date: 2024-01-24T13:24:49+01:00\n" -"PO-Revision-Date: 2023-11-07 15:51+0200\n" +"POT-Creation-Date: 2024-04-15T10:07:35+03:00\n" +"PO-Revision-Date: 2024-04-05 08:52+0300\n" "Last-Translator: Razvan Stefanescu \n" "Language-Team: Romanian \n" "Language: ro\n" @@ -11,1268 +11,1286 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " "20)) ? 1 : 2;\n" -"X-Generator: Poedit 3.4.1\n" +"X-Generator: Poedit 3.4.2\n" -#: src/SUMMARY.md src/index.md +#: src/SUMMARY.md:3 src/index.md:1 msgid "Welcome to Comprehensive Rust 🦀" msgstr "Bine ați venit la Comprehensive Rust 🦀 (ghidul complet pentu Rust)" -#: src/SUMMARY.md src/running-the-course.md +#: src/SUMMARY.md:5 src/running-the-course.md:1 msgid "Running the Course" msgstr "Rularea cursului" -#: src/SUMMARY.md src/running-the-course/course-structure.md +#: src/SUMMARY.md:6 src/running-the-course/course-structure.md:1 msgid "Course Structure" msgstr "Structura cursului" -#: src/SUMMARY.md src/running-the-course/keyboard-shortcuts.md +#: src/SUMMARY.md:7 src/running-the-course/keyboard-shortcuts.md:1 msgid "Keyboard Shortcuts" msgstr "Scurtături de tastatură" -#: src/SUMMARY.md src/running-the-course/translations.md +#: src/SUMMARY.md:8 src/running-the-course/translations.md:1 msgid "Translations" msgstr "Traduceri" -#: src/SUMMARY.md src/cargo.md +#: src/SUMMARY.md:9 src/cargo.md:1 msgid "Using Cargo" msgstr "Folosirea Cargo" -#: src/SUMMARY.md +#: src/SUMMARY.md:10 msgid "Rust Ecosystem" msgstr "Ecosistemul Rust" -#: src/SUMMARY.md +#: src/SUMMARY.md:11 msgid "Code Samples" msgstr "Mostre de cod" -#: src/SUMMARY.md +#: src/SUMMARY.md:12 msgid "Running Cargo Locally" msgstr "Rularea Cargo local" -#: src/SUMMARY.md +#: src/SUMMARY.md:16 msgid "Day 1: Morning" msgstr "Ziua 1: Dimineața" -#: src/SUMMARY.md +#: src/SUMMARY.md:18 src/SUMMARY.md:47 src/SUMMARY.md:76 src/SUMMARY.md:103 +#: src/SUMMARY.md:129 src/SUMMARY.md:149 src/SUMMARY.md:167 src/SUMMARY.md:190 +#: src/SUMMARY.md:213 src/SUMMARY.md:262 src/SUMMARY.md:304 src/SUMMARY.md:355 msgid "Welcome" msgstr "Bine ați venit" -#: src/SUMMARY.md src/hello-world.md src/hello-world/hello-world.md -#, fuzzy +#: src/SUMMARY.md:19 src/SUMMARY.md:24 src/hello-world.md:1 +#: src/types-and-values/hello-world.md:1 msgid "Hello, World" -msgstr "Bună lume!" +msgstr "Bună lume" -#: src/SUMMARY.md src/hello-world/what-is-rust.md +#: src/SUMMARY.md:20 src/hello-world/what-is-rust.md:1 msgid "What is Rust?" msgstr "Ce este Rust?" -#: src/SUMMARY.md src/hello-world/benefits.md +#: src/SUMMARY.md:21 src/hello-world/benefits.md:1 msgid "Benefits of Rust" -msgstr "" +msgstr "Avantajele Rust" -#: src/SUMMARY.md src/hello-world/playground.md +#: src/SUMMARY.md:22 src/hello-world/playground.md:1 msgid "Playground" -msgstr "" +msgstr "Ciornă" -#: src/SUMMARY.md src/types-and-values.md +#: src/SUMMARY.md:23 src/types-and-values.md:1 msgid "Types and Values" -msgstr "" +msgstr "Tipuri și valori" -#: src/SUMMARY.md src/types-and-values/variables.md +#: src/SUMMARY.md:25 src/types-and-values/variables.md:1 msgid "Variables" msgstr "Variabile" -#: src/SUMMARY.md src/types-and-values/values.md +#: src/SUMMARY.md:26 src/types-and-values/values.md:1 msgid "Values" -msgstr "" +msgstr "Valori" -#: src/SUMMARY.md src/types-and-values/arithmetic.md +#: src/SUMMARY.md:27 src/types-and-values/arithmetic.md:1 msgid "Arithmetic" -msgstr "" - -#: src/SUMMARY.md src/types-and-values/strings.md -msgid "Strings" -msgstr "Șiruri de caractere" +msgstr "Aritmetică" -#: src/SUMMARY.md src/types-and-values/inference.md +#: src/SUMMARY.md:28 src/types-and-values/inference.md:1 msgid "Type Inference" msgstr "Inferența de tip" -#: src/SUMMARY.md src/types-and-values/exercise.md -#, fuzzy +#: src/SUMMARY.md:29 src/types-and-values/exercise.md:1 msgid "Exercise: Fibonacci" -msgstr "Exercițiu: Evaluarea expresiilor" - -#: src/SUMMARY.md src/types-and-values/solution.md -#: 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/std-traits/solution.md src/memory-management/solution.md -#: src/smart-pointers/solution.md src/borrowing/solution.md -#: src/slices-and-lifetimes/solution.md src/iterators/solution.md -#: src/modules/solution.md src/testing/solution.md -#: src/error-handling/solution.md src/unsafe-rust/solution.md -#, fuzzy +msgstr "Exercițiu: Fibonacci" + +#: src/SUMMARY.md:30 src/SUMMARY.md:43 src/SUMMARY.md:54 src/SUMMARY.md:61 +#: src/SUMMARY.md:70 src/SUMMARY.md:82 src/SUMMARY.md:91 src/SUMMARY.md:99 +#: src/SUMMARY.md:113 src/SUMMARY.md:123 src/SUMMARY.md:139 src/SUMMARY.md:145 +#: src/SUMMARY.md:155 src/SUMMARY.md:161 src/SUMMARY.md:173 src/SUMMARY.md:180 +#: src/SUMMARY.md:186 src/SUMMARY.md:198 src/SUMMARY.md:207 +#: src/types-and-values/solution.md:1 src/control-flow-basics/solution.md:1 +#: src/tuples-and-arrays/solution.md:1 src/references/solution.md:1 +#: src/user-defined-types/solution.md:1 src/pattern-matching/solution.md:1 +#: src/methods-and-traits/solution.md:1 src/generics/solution.md:1 +#: src/std-types/solution.md:1 src/std-traits/solution.md:1 +#: src/memory-management/solution.md:1 src/smart-pointers/solution.md:1 +#: src/borrowing/solution.md:1 src/lifetimes/solution.md:1 +#: src/iterators/solution.md:1 src/modules/solution.md:1 +#: src/testing/solution.md:1 src/error-handling/solution.md:1 +#: src/unsafe-rust/solution.md:1 msgid "Solution" -msgstr "Soluții" +msgstr "Soluție" -#: src/SUMMARY.md src/control-flow-basics.md -#, fuzzy +#: src/SUMMARY.md:31 src/control-flow-basics.md:1 msgid "Control Flow Basics" -msgstr "Fluxul de control" - -#: src/SUMMARY.md src/control-flow-basics/conditionals.md -msgid "Conditionals" -msgstr "" +msgstr "Bazele fluxului de control" -#: src/SUMMARY.md src/control-flow-basics/loops.md +#: src/SUMMARY.md:32 #, fuzzy +msgid "`if` Expressions" +msgstr "Expresii ‘if’" + +#: src/SUMMARY.md:33 src/control-flow-basics/loops.md:1 msgid "Loops" -msgstr "bucle `for`" +msgstr "Bucle de execuție" -#: src/SUMMARY.md src/control-flow-basics/break-continue.md -#, fuzzy +#: src/SUMMARY.md:34 src/control-flow-basics/loops/for.md:1 +msgid "`for`" +msgstr "Bucle `for`" + +#: src/SUMMARY.md:35 src/control-flow-basics/loops/loop.md:1 +msgid "`loop`" +msgstr "Bucle `loop`" + +#: src/SUMMARY.md:36 src/control-flow-basics/break-continue.md:1 msgid "`break` and `continue`" msgstr "`break` și `continue`" -#: src/SUMMARY.md src/control-flow-basics/blocks-and-scopes.md -msgid "Blocks and Scopes" +#: src/SUMMARY.md:37 src/control-flow-basics/break-continue/labels.md:1 +msgid "Labels" msgstr "" -#: src/SUMMARY.md src/control-flow-basics/functions.md +#: src/SUMMARY.md:38 src/control-flow-basics/blocks-and-scopes.md:1 +msgid "Blocks and Scopes" +msgstr "Blocuri și scopuri" + +#: src/SUMMARY.md:39 src/control-flow-basics/blocks-and-scopes/scopes.md:1 +msgid "Scopes and Shadowing" +msgstr "Scopuri și mascări" + +#: src/SUMMARY.md:40 src/control-flow-basics/functions.md:1 msgid "Functions" msgstr "Funcții" -#: src/SUMMARY.md src/control-flow-basics/macros.md -#, fuzzy +#: src/SUMMARY.md:41 src/control-flow-basics/macros.md:1 msgid "Macros" -msgstr "macro:" +msgstr "Macro-uri" -#: src/SUMMARY.md src/control-flow-basics/exercise.md +#: src/SUMMARY.md:42 src/control-flow-basics/exercise.md:1 msgid "Exercise: Collatz Sequence" -msgstr "" +msgstr "Exercițiu: secvența Collatz" -#: src/SUMMARY.md +#: src/SUMMARY.md:45 msgid "Day 1: Afternoon" msgstr "Ziua 1: După-amiaza" -#: src/SUMMARY.md src/tuples-and-arrays.md -#: src/tuples-and-arrays/tuples-and-arrays.md +#: src/SUMMARY.md:48 src/tuples-and-arrays.md:1 msgid "Tuples and Arrays" -msgstr "" +msgstr "Tupluri și vectori" -#: src/SUMMARY.md src/tuples-and-arrays/iteration.md -#, fuzzy -msgid "Array Iteration" -msgstr "Integrarea încărcăturii" +#: src/SUMMARY.md:49 src/tuples-and-arrays/arrays.md:1 +msgid "Arrays" +msgstr "Array-uri" -#: src/SUMMARY.md src/tuples-and-arrays/match.md src/pattern-matching.md -msgid "Pattern Matching" -msgstr "Potrivire de șabloane" +#: src/SUMMARY.md:50 src/tuples-and-arrays/tuples.md:1 +msgid "Tuples" +msgstr "Tupluri" + +#: src/SUMMARY.md:51 src/tuples-and-arrays/iteration.md:1 +msgid "Array Iteration" +msgstr "Iterații pe vectori" -#: src/SUMMARY.md src/tuples-and-arrays/destructuring.md -#: src/pattern-matching/destructuring.md +#: src/SUMMARY.md:52 src/tuples-and-arrays/destructuring.md:1 #, fuzzy -msgid "Destructuring" -msgstr "Destructurarea enumerărilor" +msgid "Patterns and Destructuring" +msgstr "Destructurări" -#: src/SUMMARY.md src/tuples-and-arrays/exercise.md +#: src/SUMMARY.md:53 src/tuples-and-arrays/exercise.md:1 msgid "Exercise: Nested Arrays" -msgstr "" +msgstr "Exercițiu: vectori îmbrăcați" -#: src/SUMMARY.md src/references.md +#: src/SUMMARY.md:55 src/references.md:1 msgid "References" msgstr "Referinţe" -#: src/SUMMARY.md src/references/shared.md -#, fuzzy +#: src/SUMMARY.md:56 src/references/shared.md:1 msgid "Shared References" -msgstr "Referinţe" +msgstr "Referinţe partajare" -#: src/SUMMARY.md src/references/exclusive.md -#, fuzzy +#: src/SUMMARY.md:57 src/references/exclusive.md:1 msgid "Exclusive References" -msgstr "Referințe invalide" +msgstr "Referințe exclusive" + +#: src/SUMMARY.md:58 +msgid "Slices: `&[T]`" +msgstr "Partiții: `&[T]`" -#: src/SUMMARY.md src/references/exercise.md +#: src/SUMMARY.md:59 src/references/strings.md:5 +msgid "Strings" +msgstr "Șiruri de caractere" + +#: src/SUMMARY.md:60 src/references/exercise.md:1 msgid "Exercise: Geometry" -msgstr "" +msgstr "Exercițiu: Geometrie" -#: src/SUMMARY.md src/user-defined-types.md -#, fuzzy +#: src/SUMMARY.md:62 src/user-defined-types.md:1 msgid "User-Defined Types" -msgstr "Tipuri scalare" +msgstr "Tipuri definite de utilizator" -#: src/SUMMARY.md src/user-defined-types/named-structs.md -#, fuzzy +#: src/SUMMARY.md:63 src/user-defined-types/named-structs.md:1 msgid "Named Structs" -msgstr "Structuri" +msgstr "Structuri cu nume" -#: src/SUMMARY.md src/user-defined-types/tuple-structs.md +#: src/SUMMARY.md:64 src/user-defined-types/tuple-structs.md:5 msgid "Tuple Structs" msgstr "Structuri Tupluri" -#: src/SUMMARY.md src/user-defined-types/enums.md -#: src/pattern-matching/destructuring.md +#: src/SUMMARY.md:65 src/user-defined-types/enums.md:1 +#: src/pattern-matching/destructuring.md:24 +#: src/pattern-matching/destructuring.md:67 msgid "Enums" msgstr "Enumerări (enums)" -#: src/SUMMARY.md src/user-defined-types/static-and-const.md +#: src/SUMMARY.md:66 +msgid "Static" +msgstr "Static" + +#: src/SUMMARY.md:67 #, fuzzy -msgid "Static and Const" -msgstr "static & const" +msgid "Const" +msgstr "Constant" -#: src/SUMMARY.md src/user-defined-types/aliases.md +#: src/SUMMARY.md:68 src/user-defined-types/aliases.md:1 msgid "Type Aliases" -msgstr "" +msgstr "Aliasuri de tip" -#: src/SUMMARY.md src/user-defined-types/exercise.md +#: src/SUMMARY.md:69 src/user-defined-types/exercise.md:1 #, fuzzy msgid "Exercise: Elevator Events" msgstr "Exercițiu: Evaluarea expresiilor" -#: src/SUMMARY.md +#: src/SUMMARY.md:74 msgid "Day 2: Morning" msgstr "Ziua 2: Dimineața" -#: src/SUMMARY.md src/pattern-matching/let-control-flow.md -#, fuzzy +#: src/SUMMARY.md:77 src/pattern-matching.md:1 +msgid "Pattern Matching" +msgstr "Potrivire de șabloane" + +#: src/SUMMARY.md:78 src/pattern-matching/match.md:1 +msgid "Matching Values" +msgstr "" + +#: src/SUMMARY.md:79 src/pattern-matching/destructuring.md:1 +msgid "Destructuring" +msgstr "Destructurări" + +#: src/SUMMARY.md:80 src/pattern-matching/let-control-flow.md:1 msgid "Let Control Flow" msgstr "Fluxul de control" -#: src/SUMMARY.md src/pattern-matching/exercise.md -#, fuzzy +#: src/SUMMARY.md:81 src/pattern-matching/exercise.md:1 msgid "Exercise: Expression Evaluation" msgstr "Exercițiu: Evaluarea expresiilor" -#: src/SUMMARY.md src/methods-and-traits.md -#, fuzzy +#: src/SUMMARY.md:83 src/methods-and-traits.md:1 msgid "Methods and Traits" -msgstr "Citire și scriere" +msgstr "Metode și trăsături" -#: src/SUMMARY.md src/methods-and-traits/methods.md +#: src/SUMMARY.md:84 src/methods-and-traits/methods.md:1 msgid "Methods" msgstr "Metode" -#: src/SUMMARY.md src/methods-and-traits/traits.md +#: src/SUMMARY.md:85 src/methods-and-traits/traits.md:1 msgid "Traits" msgstr "Trăsături" -#: src/SUMMARY.md src/methods-and-traits/deriving.md +#: src/SUMMARY.md:86 src/methods-and-traits/traits/implementing.md:1 #, fuzzy -msgid "Deriving" -msgstr "Derivarea trăsăturilor" +msgid "Implementing Traits" +msgstr "Implementarea trăsăturilor nesigure" -#: src/SUMMARY.md src/methods-and-traits/trait-objects.md +#: src/SUMMARY.md:87 src/methods-and-traits/traits/supertraits.md:1 #, fuzzy -msgid "Trait Objects" -msgstr "Obiecte cu trăsături" +msgid "Supertraits" +msgstr "Mai multe trăsături" + +#: src/SUMMARY.md:88 src/methods-and-traits/traits/associated-types.md:1 +#, fuzzy +msgid "Associated Types" +msgstr "Tipuri partajate" -#: src/SUMMARY.md src/methods-and-traits/exercise.md +#: src/SUMMARY.md:89 src/methods-and-traits/deriving.md:1 +msgid "Deriving" +msgstr "Derivarea" + +#: src/SUMMARY.md:90 +#, fuzzy msgid "Exercise: Generic Logger" -msgstr "" +msgstr "Exercițiu: Logger generic" -#: src/SUMMARY.md src/generics.md +#: src/SUMMARY.md:92 src/generics.md:1 msgid "Generics" msgstr "Produse generice" -#: src/SUMMARY.md src/generics/generic-functions.md -#, fuzzy +#: src/SUMMARY.md:93 src/generics/generic-functions.md:1 msgid "Generic Functions" -msgstr "Funcții externe" +msgstr "Funcții generice" -#: src/SUMMARY.md src/generics/generic-data.md +#: src/SUMMARY.md:94 src/generics/generic-data.md:1 msgid "Generic Data Types" msgstr "Tipuri de date generice" -#: src/SUMMARY.md src/generics/trait-bounds.md +#: src/SUMMARY.md:95 src/generics/generic-traits.md:1 +#, fuzzy +msgid "Generic Traits" +msgstr "Produse generice" + +#: src/SUMMARY.md:96 src/generics/trait-bounds.md:1 msgid "Trait Bounds" msgstr "Limite de trăsături" -#: src/SUMMARY.md src/generics/impl-trait.md -#, fuzzy +#: src/SUMMARY.md:97 src/generics/impl-trait.md:1 msgid "`impl Trait`" msgstr "`impl Trait`" -#: src/SUMMARY.md src/generics/exercise.md +#: src/SUMMARY.md:98 src/generics/exercise.md:1 msgid "Exercise: Generic `min`" -msgstr "" +msgstr "Exercițiu: ‘min’ generic" -#: src/SUMMARY.md +#: src/SUMMARY.md:101 msgid "Day 2: Afternoon" msgstr "Ziua 2: După-amiaza" -#: src/SUMMARY.md src/std-types.md -#, fuzzy +#: src/SUMMARY.md:104 src/std-types.md:1 msgid "Standard Library Types" -msgstr "Biblioteca standard" +msgstr "Biblioteca de tipuri standard" -#: src/SUMMARY.md src/std-types/std.md +#: src/SUMMARY.md:105 src/std-types/std.md:1 msgid "Standard Library" msgstr "Biblioteca standard" -#: src/SUMMARY.md src/std-types/docs.md -#, fuzzy +#: src/SUMMARY.md:106 src/std-types/docs.md:1 msgid "Documentation" -msgstr "Teste de documentare" +msgstr "Documentație" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:107 msgid "`Option`" -msgstr "`Durată`" +msgstr "‘Option’" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:108 msgid "`Result`" -msgstr "`Opțiune`, `Rezultat`" +msgstr "`Result`" -#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md -#, fuzzy +#: src/SUMMARY.md:109 src/android/aidl/types/primitives.md:14 +#: src/android/interoperability/cpp/type-mapping.md:5 msgid "`String`" -msgstr "Sir" +msgstr "Șir" -#: src/SUMMARY.md src/std-types/vec.md -#, fuzzy +#: src/SUMMARY.md:110 src/std-types/vec.md:1 msgid "`Vec`" msgstr "`Vec`" -#: src/SUMMARY.md src/std-types/hashmap.md src/bare-metal/no_std.md -#, fuzzy +#: src/SUMMARY.md:111 src/std-types/hashmap.md:1 src/bare-metal/no_std.md:46 msgid "`HashMap`" msgstr "`HashMap`" -#: src/SUMMARY.md src/std-types/exercise.md -#, fuzzy +#: src/SUMMARY.md:112 src/std-types/exercise.md:1 msgid "Exercise: Counter" -msgstr "Exerciții" +msgstr "Exercițiu: numărător" -#: src/SUMMARY.md src/std-traits.md -#, fuzzy +#: src/SUMMARY.md:114 src/std-traits.md:1 msgid "Standard Library Traits" -msgstr "Biblioteca standard" +msgstr "Biblioteca standard de trăsături" -#: src/SUMMARY.md src/std-traits/comparisons.md src/async.md -#, fuzzy +#: src/SUMMARY.md:115 src/std-traits/comparisons.md:1 src/async.md:17 msgid "Comparisons" msgstr "Comparații" -#: src/SUMMARY.md src/std-traits/operators.md -#, fuzzy +#: src/SUMMARY.md:116 src/std-traits/operators.md:1 msgid "Operators" -msgstr "Iteratori" +msgstr "Operatori" -#: src/SUMMARY.md src/std-traits/from-and-into.md -#, fuzzy +#: src/SUMMARY.md:117 src/std-traits/from-and-into.md:1 msgid "`From` and `Into`" -msgstr "`De` și `Întru`" +msgstr "`From` și `Into`" -#: src/SUMMARY.md src/std-traits/casting.md -#, fuzzy +#: src/SUMMARY.md:118 src/std-traits/casting.md:1 msgid "Casting" -msgstr "Testare" +msgstr "Transformarea" -#: src/SUMMARY.md src/std-traits/read-and-write.md -#, fuzzy +#: src/SUMMARY.md:119 src/std-traits/read-and-write.md:1 msgid "`Read` and `Write`" -msgstr "`Read` și `Write`" +msgstr "Citire și scriere" -#: src/SUMMARY.md +#: src/SUMMARY.md:120 msgid "`Default`, struct update syntax" -msgstr "" +msgstr "‘Default’ (implicit), sintaxa de actualizare a structurilor" -#: src/SUMMARY.md src/std-traits/closures.md -#, fuzzy +#: src/SUMMARY.md:121 src/std-traits/closures.md:1 msgid "Closures" msgstr "Închideri" -#: src/SUMMARY.md src/std-traits/exercise.md -#, fuzzy +#: src/SUMMARY.md:122 src/std-traits/exercise.md:1 msgid "Exercise: ROT13" -msgstr "Exerciții" +msgstr "Exercițiu: ROT13" -#: src/SUMMARY.md +#: src/SUMMARY.md:127 msgid "Day 3: Morning" msgstr "Ziua 3: Dimineața" -#: src/SUMMARY.md src/memory-management.md +#: src/SUMMARY.md:130 src/memory-management.md:1 msgid "Memory Management" msgstr "Gestionarea memoriei" -#: src/SUMMARY.md src/memory-management/review.md +#: src/SUMMARY.md:131 src/memory-management/review.md:1 msgid "Review of Program Memory" -msgstr "" +msgstr "Utilizarea memoriei de către programe" -#: src/SUMMARY.md src/memory-management/approaches.md -#, fuzzy +#: src/SUMMARY.md:132 src/memory-management/approaches.md:1 msgid "Approaches to Memory Management" -msgstr "Gestionarea automată a memoriei" +msgstr "Abordări ale administrării memoriei" -#: src/SUMMARY.md src/memory-management/ownership.md +#: src/SUMMARY.md:133 src/memory-management/ownership.md:1 msgid "Ownership" msgstr "Posesia" -#: src/SUMMARY.md src/memory-management/move.md +#: src/SUMMARY.md:134 src/memory-management/move.md:1 msgid "Move Semantics" msgstr "Semantica mutărilor" -#: src/SUMMARY.md +#: src/SUMMARY.md:135 msgid "`Clone`" -msgstr "" +msgstr "‘Clone’" -#: src/SUMMARY.md src/memory-management/copy-types.md -#, fuzzy +#: src/SUMMARY.md:136 src/memory-management/copy-types.md:1 msgid "Copy Types" -msgstr "Tipuri compuse" +msgstr "Tipuri copiate" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:137 msgid "`Drop`" -msgstr "Picătură" +msgstr "‘Drop’" -#: src/SUMMARY.md src/memory-management/exercise.md +#: src/SUMMARY.md:138 src/memory-management/exercise.md:1 msgid "Exercise: Builder Type" -msgstr "" +msgstr "Exercițiu: Tipul constructor" -#: src/SUMMARY.md src/smart-pointers.md +#: src/SUMMARY.md:140 src/smart-pointers.md:1 msgid "Smart Pointers" -msgstr "" +msgstr "Pointeri inteligenți" -#: src/SUMMARY.md src/smart-pointers/box.md -#: src/android/interoperability/cpp/type-mapping.md -#, fuzzy +#: src/SUMMARY.md:141 src/smart-pointers/box.md:1 +#: src/android/interoperability/cpp/type-mapping.md:9 msgid "`Box`" -msgstr "`Box`" +msgstr "`Box`" -#: src/SUMMARY.md src/smart-pointers/rc.md -#, fuzzy +#: src/SUMMARY.md:142 src/smart-pointers/rc.md:1 msgid "`Rc`" msgstr "`Rc`" -#: src/SUMMARY.md src/smart-pointers/exercise.md +#: src/SUMMARY.md:143 src/smart-pointers/trait-objects.md:1 +msgid "Trait Objects" +msgstr "Obiecte cu trăsături" + +#: src/SUMMARY.md:144 src/smart-pointers/exercise.md:1 msgid "Exercise: Binary Tree" -msgstr "" +msgstr "Exercițiu: arbore binar" -#: src/SUMMARY.md +#: src/SUMMARY.md:147 msgid "Day 3: Afternoon" msgstr "Ziua 3: După-amiaza" -#: src/SUMMARY.md src/borrowing.md +#: src/SUMMARY.md:150 src/borrowing.md:1 msgid "Borrowing" msgstr "Împrumut" -#: src/SUMMARY.md src/borrowing/shared.md -#, fuzzy +#: src/SUMMARY.md:151 src/borrowing/shared.md:1 msgid "Borrowing a Value" -msgstr "Împrumut" +msgstr "Împrumutul unei valori" -#: src/SUMMARY.md src/borrowing/borrowck.md -#, fuzzy +#: src/SUMMARY.md:152 src/borrowing/borrowck.md:1 msgid "Borrow Checking" -msgstr "Împrumut" +msgstr "Verificarea împrumuturilor" -#: src/SUMMARY.md src/borrowing/interior-mutability.md -#, fuzzy +#: src/SUMMARY.md:153 src/borrowing/interior-mutability.md:1 msgid "Interior Mutability" -msgstr "Interoperabilitate" +msgstr "Mutabilitate internă" -#: src/SUMMARY.md src/borrowing/exercise.md -#, fuzzy +#: src/SUMMARY.md:154 src/borrowing/exercise.md:1 msgid "Exercise: Health Statistics" -msgstr "Statistici de sănătate" +msgstr "Exercițiu: statistici de sănătate" -#: src/SUMMARY.md src/slices-and-lifetimes.md +#: src/SUMMARY.md:156 src/lifetimes.md:1 #, fuzzy -msgid "Slices and Lifetimes" -msgstr "Durata de viață" +msgid "Lifetimes" +msgstr "Durata de viață a structurilor" -#: src/SUMMARY.md -#, fuzzy -msgid "Slices: `&[T]`" -msgstr "Felii" - -#: src/SUMMARY.md src/slices-and-lifetimes/str.md -#, fuzzy -msgid "String References" -msgstr "Referințe invalide" - -#: src/SUMMARY.md src/slices-and-lifetimes/lifetime-annotations.md -#, fuzzy +#: src/SUMMARY.md:157 src/lifetimes/lifetime-annotations.md:1 msgid "Lifetime Annotations" -msgstr "Duratele de viață în apelurile de funcții" +msgstr "Duratele de viață în anotări" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:158 msgid "Lifetime Elision" -msgstr "Durata de viață" +msgstr "Extinderea duratei de viață" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:159 msgid "Struct Lifetimes" -msgstr "Durata de viață" +msgstr "Durata de viață a structurilor" -#: src/SUMMARY.md src/slices-and-lifetimes/exercise.md +#: src/SUMMARY.md:160 src/lifetimes/exercise.md:1 msgid "Exercise: Protobuf Parsing" -msgstr "" +msgstr "Exercițiu: Parsarea Protobuf" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:165 msgid "Day 4: Morning" msgstr "Ziua 1: Dimineața" -#: src/SUMMARY.md src/iterators.md -#, fuzzy +#: src/SUMMARY.md:168 src/iterators.md:1 msgid "Iterators" msgstr "Iteratori" -#: src/SUMMARY.md src/iterators/iterator.md src/bare-metal/no_std.md -#, fuzzy +#: src/SUMMARY.md:169 src/iterators/iterator.md:1 src/bare-metal/no_std.md:28 msgid "`Iterator`" msgstr "`Iterator`" -#: src/SUMMARY.md src/iterators/intoiterator.md -#, fuzzy +#: src/SUMMARY.md:170 src/iterators/intoiterator.md:1 msgid "`IntoIterator`" msgstr "`IntoIterator`" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:171 msgid "`FromIterator`" -msgstr "FromIterator" +msgstr "`FromIterator`" -#: src/SUMMARY.md src/iterators/exercise.md +#: src/SUMMARY.md:172 src/iterators/exercise.md:1 msgid "Exercise: Iterator Method Chaining" -msgstr "" +msgstr "Exercițiu: Înlăntuirea metodelor iterator" -#: src/SUMMARY.md src/modules.md src/modules/modules.md +#: src/SUMMARY.md:174 src/SUMMARY.md:175 src/modules.md:1 +#: src/modules/modules.md:1 msgid "Modules" msgstr "Module" -#: src/SUMMARY.md src/modules/filesystem.md +#: src/SUMMARY.md:176 src/modules/filesystem.md:1 msgid "Filesystem Hierarchy" msgstr "Ierarhia sistemului de fișiere" -#: src/SUMMARY.md src/modules/visibility.md +#: src/SUMMARY.md:177 src/modules/visibility.md:1 msgid "Visibility" msgstr "Vizibilitate" -#: src/SUMMARY.md +#: src/SUMMARY.md:178 msgid "`use`, `super`, `self`" -msgstr "" +msgstr "`use`, `super`, `self`" -#: src/SUMMARY.md src/modules/exercise.md +#: src/SUMMARY.md:179 src/modules/exercise.md:1 msgid "Exercise: Modules for a GUI Library" -msgstr "" +msgstr "Exercițiu: Module pentru o biblioteca pentru interfața grafică" -#: src/SUMMARY.md src/testing.md src/chromium/testing.md +#: src/SUMMARY.md:181 src/SUMMARY.md:234 src/SUMMARY.md:271 src/testing.md:1 +#: src/chromium/testing.md:1 msgid "Testing" msgstr "Testare" -#: src/SUMMARY.md +#: src/SUMMARY.md:182 msgid "Test Modules" msgstr "Module de testare" -#: src/SUMMARY.md src/testing/other.md -#, fuzzy +#: src/SUMMARY.md:183 src/testing/other.md:1 msgid "Other Types of Tests" -msgstr "Alte proiecte" +msgstr "Alte tipuri de teste" -#: src/SUMMARY.md src/testing/useful-crates.md -msgid "Useful Crates" -msgstr "Lăzi utile" - -#: src/SUMMARY.md src/testing/googletest.md -msgid "GoogleTest" -msgstr "" - -#: src/SUMMARY.md src/testing/mocking.md -msgid "Mocking" -msgstr "" - -#: src/SUMMARY.md src/testing/lints.md +#: src/SUMMARY.md:184 src/testing/lints.md:1 msgid "Compiler Lints and Clippy" -msgstr "" +msgstr "Corecții compilator și Clippy" -#: src/SUMMARY.md src/testing/exercise.md -#, fuzzy +#: src/SUMMARY.md:185 src/testing/exercise.md:1 msgid "Exercise: Luhn Algorithm" -msgstr "Algoritmul Luhn" +msgstr "Exercițiu: Algoritmul Luhn" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:188 msgid "Day 4: Afternoon" -msgstr "Ziua 1: După-amiaza" +msgstr "Ziua 4: După-amiaza" -#: src/SUMMARY.md src/error-handling.md +#: src/SUMMARY.md:191 src/error-handling.md:1 msgid "Error Handling" msgstr "Gestionarea erorilor" -#: src/SUMMARY.md src/error-handling/panics.md +#: src/SUMMARY.md:192 src/error-handling/panics.md:1 msgid "Panics" msgstr "Panică" -#: src/SUMMARY.md src/error-handling/try.md -#, fuzzy +#: src/SUMMARY.md:193 src/error-handling/try.md:1 msgid "Try Operator" -msgstr "Iterator" +msgstr "Operatorul ‘try’" -#: src/SUMMARY.md src/error-handling/try-conversions.md -#, fuzzy +#: src/SUMMARY.md:194 src/error-handling/try-conversions.md:1 msgid "Try Conversions" -msgstr "Conversii implicite" +msgstr "Conversii ‘try’" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:195 msgid "`Error` Trait" -msgstr "`Error`" +msgstr "Trăsături ‘Error’" -#: src/SUMMARY.md src/error-handling/thiserror-and-anyhow.md -#, fuzzy +#: src/SUMMARY.md:196 src/error-handling/thiserror-and-anyhow.md:1 msgid "`thiserror` and `anyhow`" -msgstr "`De` și `Întru`" +msgstr "`thiserror` și `anyhow`" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:197 msgid "Exercise: Rewriting with `Result`" -msgstr "Gestionarea structurată a erorilor cu `Result`" +msgstr "Exercițiu: rescrierea cu `Result`" -#: src/SUMMARY.md src/unsafe-rust.md src/unsafe-rust/unsafe.md +#: src/SUMMARY.md:199 src/unsafe-rust.md:1 src/unsafe-rust/unsafe.md:1 msgid "Unsafe Rust" msgstr "Rust nesigur" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:200 msgid "Unsafe" -msgstr "nesigură:" +msgstr "Nesigur" -#: src/SUMMARY.md src/unsafe-rust/dereferencing.md +#: src/SUMMARY.md:201 src/unsafe-rust/dereferencing.md:1 msgid "Dereferencing Raw Pointers" msgstr "Dereferențierea pointerilor bruți" -#: src/SUMMARY.md src/unsafe-rust/mutable-static.md +#: src/SUMMARY.md:202 src/unsafe-rust/mutable-static.md:1 msgid "Mutable Static Variables" msgstr "Variabile statice mutabile" -#: src/SUMMARY.md src/unsafe-rust/unions.md +#: src/SUMMARY.md:203 src/unsafe-rust/unions.md:1 msgid "Unions" msgstr "Sindicate (Unions)" -#: src/SUMMARY.md src/unsafe-rust/unsafe-functions.md -#, fuzzy +#: src/SUMMARY.md:204 src/unsafe-rust/unsafe-functions.md:1 msgid "Unsafe Functions" -msgstr "Apelarea funcțiilor nesigure" +msgstr "Funcții nesigure" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:205 msgid "Unsafe Traits" -msgstr "Implementarea trăsăturilor nesigure" +msgstr "Trăsături nesigure" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:206 msgid "Exercise: FFI Wrapper" -msgstr "Înfășurătorul FFI sigur" +msgstr "Înpachetare sigură prin FFI" -#: src/SUMMARY.md src/bare-metal/android.md +#: src/SUMMARY.md:209 src/SUMMARY.md:345 src/bare-metal/android.md:1 msgid "Android" msgstr "Android" -#: src/SUMMARY.md src/android/setup.md src/chromium/setup.md +#: src/SUMMARY.md:214 src/SUMMARY.md:263 src/android/setup.md:1 +#: src/chromium/setup.md:1 msgid "Setup" msgstr "Setare" -#: src/SUMMARY.md src/android/build-rules.md +#: src/SUMMARY.md:215 src/SUMMARY.md:266 src/android/build-rules.md:1 msgid "Build Rules" msgstr "Reguli de construcție" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:216 msgid "Binary" -msgstr "Binare" +msgstr "Programe binare" -#: src/SUMMARY.md +#: src/SUMMARY.md:217 msgid "Library" -msgstr "Bibliotecă" +msgstr "Biblioteci" -#: src/SUMMARY.md src/android/aidl.md +#: src/SUMMARY.md:218 src/android/aidl.md:1 msgid "AIDL" msgstr "AIDL" -#: src/SUMMARY.md +#: src/SUMMARY.md:219 src/android/aidl/birthday-service.md:1 +#, fuzzy +msgid "Birthday Service Tutorial" +msgstr "/** Interfață de serviciu de ziua de naștere. */" + +#: src/SUMMARY.md:220 msgid "Interface" msgstr "Interfață" -#: src/SUMMARY.md -msgid "Implementation" -msgstr "Implementare" +#: src/SUMMARY.md:221 +msgid "Service API" +msgstr "" + +#: src/SUMMARY.md:222 +#, fuzzy +msgid "Service" +msgstr "Server" -#: src/SUMMARY.md +#: src/SUMMARY.md:223 msgid "Server" msgstr "Server" -#: src/SUMMARY.md src/android/aidl/deploy.md +#: src/SUMMARY.md:224 src/android/aidl/example-service/deploy.md:1 msgid "Deploy" msgstr "Lanseaza" -#: src/SUMMARY.md +#: src/SUMMARY.md:225 msgid "Client" msgstr "Client" -#: src/SUMMARY.md src/android/aidl/changing.md +#: src/SUMMARY.md:226 src/android/aidl/example-service/changing-definition.md:1 msgid "Changing API" msgstr "Schimbarea API-ului" -#: src/SUMMARY.md src/android/logging.md src/bare-metal/aps/logging.md +#: src/SUMMARY.md:227 +#, fuzzy +msgid "Updating Implementations" +msgstr "Implementare" + +#: src/SUMMARY.md:228 +#, fuzzy +msgid "AIDL Types" +msgstr "Tipuri" + +#: src/SUMMARY.md:229 src/android/aidl/types/primitives.md:1 +msgid "Primitive Types" +msgstr "" + +#: src/SUMMARY.md:230 src/android/aidl/types/arrays.md:1 +#, fuzzy +msgid "Array Types" +msgstr "Array-uri" + +#: src/SUMMARY.md:231 src/android/aidl/types/objects.md:1 +#, fuzzy +msgid "Sending Objects" +msgstr "Obiecte cu trăsături" + +#: src/SUMMARY.md:232 src/android/aidl/types/parcelables.md:1 +#, fuzzy +msgid "Parcelables" +msgstr "Variabile" + +#: src/SUMMARY.md:233 src/android/aidl/types/file-descriptor.md:1 +msgid "Sending Files" +msgstr "" + +#: src/SUMMARY.md:235 src/android/testing/googletest.md:1 +msgid "GoogleTest" +msgstr "GoogleTest" + +#: src/SUMMARY.md:236 src/android/testing/mocking.md:1 +msgid "Mocking" +msgstr "Imitarea" + +#: src/SUMMARY.md:237 src/SUMMARY.md:335 src/android/logging.md:1 +#: src/bare-metal/aps/logging.md:1 msgid "Logging" msgstr "Jurnalizare (loguri)" -#: src/SUMMARY.md src/android/interoperability.md +#: src/SUMMARY.md:238 src/android/interoperability.md:1 msgid "Interoperability" msgstr "Interoperabilitate" -#: src/SUMMARY.md +#: src/SUMMARY.md:239 msgid "With C" msgstr "Cu C" -#: src/SUMMARY.md +#: src/SUMMARY.md:240 msgid "Calling C with Bindgen" msgstr "Apelarea C cu Bindgen" -#: src/SUMMARY.md +#: src/SUMMARY.md:241 msgid "Calling Rust from C" msgstr "Apelarea Rust din C" -#: src/SUMMARY.md src/android/interoperability/cpp.md +#: src/SUMMARY.md:242 src/android/interoperability/cpp.md:1 msgid "With C++" msgstr "Cu C++" -#: src/SUMMARY.md src/android/interoperability/cpp/bridge.md -#, fuzzy +#: src/SUMMARY.md:243 src/android/interoperability/cpp/bridge.md:1 msgid "The Bridge Module" -msgstr "Module de testare" +msgstr "Modulul de interconectare" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:244 msgid "Rust Bridge" -msgstr "Binare Rust" +msgstr "Interconectarea cu Rust" -#: src/SUMMARY.md src/android/interoperability/cpp/generated-cpp.md +#: src/SUMMARY.md:245 src/android/interoperability/cpp/generated-cpp.md:1 msgid "Generated C++" -msgstr "" +msgstr "Cod C++ generat" -#: src/SUMMARY.md +#: src/SUMMARY.md:246 msgid "C++ Bridge" -msgstr "" +msgstr "Interconectarea cu C++" -#: src/SUMMARY.md src/android/interoperability/cpp/shared-types.md -#, fuzzy +#: src/SUMMARY.md:247 src/android/interoperability/cpp/shared-types.md:1 msgid "Shared Types" -msgstr "Tipuri scalare" +msgstr "Tipuri partajate" -#: src/SUMMARY.md src/android/interoperability/cpp/shared-enums.md +#: src/SUMMARY.md:248 src/android/interoperability/cpp/shared-enums.md:1 msgid "Shared Enums" -msgstr "" +msgstr "Enumerări partajate" -#: src/SUMMARY.md src/android/interoperability/cpp/rust-result.md -#, fuzzy +#: src/SUMMARY.md:249 src/android/interoperability/cpp/rust-result.md:1 msgid "Rust Error Handling" -msgstr "Gestionarea erorilor" +msgstr "Gestionarea erorilor în Rust" -#: src/SUMMARY.md src/android/interoperability/cpp/cpp-exception.md -#, fuzzy +#: src/SUMMARY.md:250 src/android/interoperability/cpp/cpp-exception.md:1 msgid "C++ Error Handling" -msgstr "Gestionarea erorilor" +msgstr "Gestionarea erorilor în C++" -#: src/SUMMARY.md src/android/interoperability/cpp/type-mapping.md +#: src/SUMMARY.md:251 src/android/interoperability/cpp/type-mapping.md:1 msgid "Additional Types" -msgstr "" +msgstr "Tipuri suplimentare" -#: src/SUMMARY.md +#: src/SUMMARY.md:252 msgid "Building for Android: C++" -msgstr "" +msgstr "Construirea pentru Android: C++" -#: src/SUMMARY.md +#: src/SUMMARY.md:253 msgid "Building for Android: Genrules" -msgstr "" +msgstr "Construirea pentru Android: reguli de generare" -#: src/SUMMARY.md +#: src/SUMMARY.md:254 msgid "Building for Android: Rust" -msgstr "" +msgstr "Construirea pentru Android: Rust" -#: src/SUMMARY.md +#: src/SUMMARY.md:255 msgid "With Java" msgstr "Cu Java" -#: 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 +#: src/SUMMARY.md:256 src/SUMMARY.md:318 src/SUMMARY.md:347 src/SUMMARY.md:369 +#: src/SUMMARY.md:391 src/exercises/android/morning.md:1 +#: src/exercises/bare-metal/morning.md:1 +#: src/exercises/bare-metal/afternoon.md:1 +#: src/exercises/concurrency/morning.md:1 +#: src/exercises/concurrency/afternoon.md:1 msgid "Exercises" msgstr "Exerciții" -#: src/SUMMARY.md +#: src/SUMMARY.md:258 msgid "Chromium" -msgstr "" +msgstr "Chromium" -#: src/SUMMARY.md src/chromium/cargo.md +#: src/SUMMARY.md:264 src/chromium/cargo.md:1 msgid "Comparing Chromium and Cargo Ecosystems" -msgstr "" +msgstr "Compararea ecosistemelor Chromium și Cargo" -#: src/SUMMARY.md +#: src/SUMMARY.md:265 msgid "Policy" -msgstr "" +msgstr "Politici" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:267 msgid "Unsafe Code" -msgstr "Rust nesigur" +msgstr "Cod nesigur" -#: src/SUMMARY.md src/chromium/build-rules/depending.md +#: src/SUMMARY.md:268 src/chromium/build-rules/depending.md:1 msgid "Depending on Rust Code from Chromium C++" -msgstr "" +msgstr "În funcție de codul Rust din Chromium C++" -#: src/SUMMARY.md src/chromium/build-rules/vscode.md +#: src/SUMMARY.md:269 src/chromium/build-rules/vscode.md:1 msgid "Visual Studio Code" -msgstr "" +msgstr "Visual Studio Code" -#: src/SUMMARY.md src/exercises/chromium/third-party.md -#, fuzzy +#: src/SUMMARY.md:270 src/SUMMARY.md:275 src/SUMMARY.md:283 src/SUMMARY.md:296 +#: src/exercises/chromium/third-party.md:1 msgid "Exercise" -msgstr "Exerciții" +msgstr "Exercițiu" -#: src/SUMMARY.md src/chromium/testing/rust-gtest-interop.md +#: src/SUMMARY.md:272 src/chromium/testing/rust-gtest-interop.md:1 msgid "`rust_gtest_interop` Library" -msgstr "" +msgstr "Biblioteca `rust_gtest_interop`" -#: src/SUMMARY.md src/chromium/testing/build-gn.md +#: src/SUMMARY.md:273 src/chromium/testing/build-gn.md:1 msgid "GN Rules for Rust Tests" -msgstr "" +msgstr "Reguli GN pentru testele Rust" -#: src/SUMMARY.md src/chromium/testing/chromium-import-macro.md +#: src/SUMMARY.md:274 src/chromium/testing/chromium-import-macro.md:1 msgid "`chromium::import!` Macro" -msgstr "" +msgstr "Macro-ul `chromium::import!`" -#: src/SUMMARY.md src/chromium/interoperability-with-cpp.md -#, fuzzy +#: src/SUMMARY.md:276 src/chromium/interoperability-with-cpp.md:1 msgid "Interoperability with C++" -msgstr "Interoperabilitate cu C" +msgstr "Interoperabilitatea cu C++" -#: src/SUMMARY.md src/chromium/interoperability-with-cpp/example-bindings.md -#, fuzzy +#: src/SUMMARY.md:277 +#: src/chromium/interoperability-with-cpp/example-bindings.md:1 msgid "Example Bindings" -msgstr "Exemple" +msgstr "Exemple de legături" -#: src/SUMMARY.md src/chromium/interoperability-with-cpp/limitations-of-cxx.md +#: src/SUMMARY.md:278 +#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:1 msgid "Limitations of CXX" -msgstr "" +msgstr "Limitări ale CXX" -#: src/SUMMARY.md src/chromium/interoperability-with-cpp/error-handling.md -#, fuzzy +#: src/SUMMARY.md:279 +#: src/chromium/interoperability-with-cpp/error-handling.md:1 msgid "CXX Error Handling" -msgstr "Gestionarea erorilor" +msgstr "Gestionarea erorilor în CXX" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:280 msgid "Error Handling: QR Example" -msgstr "Gestionarea erorilor" +msgstr "Gestionarea erorilor: exemplu QR" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:281 msgid "Error Handling: PNG Example" -msgstr "Gestionarea erorilor" +msgstr "Gestionarea erorilor: exemplu PNG" -#: src/SUMMARY.md +#: src/SUMMARY.md:282 msgid "Using CXX in Chromium" -msgstr "" +msgstr "Utilizarea CXX în Chromium" -#: src/SUMMARY.md src/chromium/adding-third-party-crates.md +#: src/SUMMARY.md:284 src/chromium/adding-third-party-crates.md:1 msgid "Adding Third Party Crates" -msgstr "" +msgstr "Adăugarea de lăzi ale unor terțe părți" -#: src/SUMMARY.md +#: src/SUMMARY.md:285 msgid "Configuring Cargo.toml" -msgstr "" +msgstr "Configurarea Cargo.toml" -#: src/SUMMARY.md -#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md +#: src/SUMMARY.md:286 +#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md:1 msgid "Configuring `gnrt_config.toml`" -msgstr "" +msgstr "Configurarea `gnrt_config.toml`" -#: src/SUMMARY.md src/chromium/adding-third-party-crates/downloading-crates.md +#: src/SUMMARY.md:287 +#: src/chromium/adding-third-party-crates/downloading-crates.md:1 msgid "Downloading Crates" -msgstr "" +msgstr "Descărcarea de lăzi" -#: src/SUMMARY.md -#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md +#: src/SUMMARY.md:288 +#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:1 msgid "Generating `gn` Build Rules" -msgstr "" +msgstr "Generarea regulilor de compilare `gn`" -#: src/SUMMARY.md src/chromium/adding-third-party-crates/resolving-problems.md +#: src/SUMMARY.md:289 +#: src/chromium/adding-third-party-crates/resolving-problems.md:1 msgid "Resolving Problems" -msgstr "" +msgstr "Rezolvarea problemelor" -#: src/SUMMARY.md -#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md +#: src/SUMMARY.md:290 +#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md:1 msgid "Build Scripts Which Generate Code" -msgstr "" +msgstr "Scripturi de construire care generează cod" -#: src/SUMMARY.md -#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md +#: src/SUMMARY.md:291 +#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md:1 msgid "Build Scripts Which Build C++ or Take Arbitrary Actions" msgstr "" +"Scripturi de construire care construiesc C++ sau efectuează acțiuni arbitrare" -#: src/SUMMARY.md -#: src/chromium/adding-third-party-crates/depending-on-a-crate.md +#: src/SUMMARY.md:292 +#: src/chromium/adding-third-party-crates/depending-on-a-crate.md:1 msgid "Depending on a Crate" -msgstr "" +msgstr "Dependințe de crater" -#: src/SUMMARY.md +#: src/SUMMARY.md:293 msgid "Reviews and Audits" -msgstr "" +msgstr "Revizuiri și audituri" -#: src/SUMMARY.md +#: src/SUMMARY.md:294 +#, fuzzy msgid "Checking into Chromium Source Code" -msgstr "" +msgstr "Modificări în codul sursă Chromium" -#: src/SUMMARY.md src/chromium/adding-third-party-crates/keeping-up-to-date.md +#: src/SUMMARY.md:295 +#: src/chromium/adding-third-party-crates/keeping-up-to-date.md:1 msgid "Keeping Crates Up to Date" -msgstr "" +msgstr "Actualizarea crate-urilor" -#: src/SUMMARY.md +#: src/SUMMARY.md:297 msgid "Bringing It Together - Exercise" -msgstr "" +msgstr "Reunind totul - Exercițiu" -#: src/SUMMARY.md src/exercises/chromium/solutions.md -#, fuzzy +#: src/SUMMARY.md:298 src/exercises/chromium/solutions.md:1 msgid "Exercise Solutions" -msgstr "Soluții" +msgstr "Soluțiile exercițiilor" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:300 msgid "Bare Metal: Morning" -msgstr "Bare Metal: Dimineața" +msgstr "Direct pe hardware: Dimineața" -#: src/SUMMARY.md src/bare-metal/no_std.md -#, fuzzy +#: src/SUMMARY.md:305 src/bare-metal/no_std.md:1 msgid "`no_std`" msgstr "`no_std`" -#: src/SUMMARY.md +#: src/SUMMARY.md:306 msgid "A Minimal Example" msgstr "Un exemplu minimalist" -#: src/SUMMARY.md src/bare-metal/no_std.md src/bare-metal/alloc.md -#, fuzzy +#: src/SUMMARY.md:307 src/bare-metal/no_std.md:12 src/bare-metal/alloc.md:1 msgid "`alloc`" msgstr "`alloc`" -#: src/SUMMARY.md src/bare-metal/microcontrollers.md +#: src/SUMMARY.md:308 src/bare-metal/microcontrollers.md:1 msgid "Microcontrollers" msgstr "Microcontrolere" -#: src/SUMMARY.md src/bare-metal/microcontrollers/mmio.md +#: src/SUMMARY.md:309 src/bare-metal/microcontrollers/mmio.md:1 msgid "Raw MMIO" msgstr "MMIO brut" -#: src/SUMMARY.md +#: src/SUMMARY.md:310 msgid "PACs" msgstr "PAC-uri" -#: src/SUMMARY.md +#: src/SUMMARY.md:311 msgid "HAL Crates" msgstr "Lăzi (crates) HAL" -#: src/SUMMARY.md +#: src/SUMMARY.md:312 msgid "Board Support Crates" -msgstr "Lăzi de suport pentru plăci" +msgstr "Crates cu suport pentru plăci" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:313 msgid "The Type State Pattern" msgstr "Modelul de stare de tip" -#: src/SUMMARY.md src/bare-metal/microcontrollers/embedded-hal.md -#, fuzzy +#: src/SUMMARY.md:314 src/bare-metal/microcontrollers/embedded-hal.md:1 msgid "`embedded-hal`" msgstr "`embedded-hal`" -#: src/SUMMARY.md src/bare-metal/microcontrollers/probe-rs.md -#, fuzzy +#: src/SUMMARY.md:315 src/bare-metal/microcontrollers/probe-rs.md:1 msgid "`probe-rs` and `cargo-embed`" -msgstr "`probe-rs`, `cargo-embed`" +msgstr "`probe-rs` și `cargo-embed`" -#: src/SUMMARY.md src/bare-metal/microcontrollers/debugging.md +#: src/SUMMARY.md:316 src/bare-metal/microcontrollers/debugging.md:1 msgid "Debugging" msgstr "Depanare" -#: src/SUMMARY.md +#: src/SUMMARY.md:317 src/SUMMARY.md:338 msgid "Other Projects" msgstr "Alte proiecte" -#: src/SUMMARY.md src/exercises/bare-metal/compass.md -#: src/exercises/bare-metal/solutions-morning.md -#, fuzzy +#: src/SUMMARY.md:319 src/exercises/bare-metal/compass.md:1 +#: src/exercises/bare-metal/solutions-morning.md:3 msgid "Compass" -msgstr "Busolă" +msgstr "Compass" -#: src/SUMMARY.md +#: src/SUMMARY.md:320 src/SUMMARY.md:349 src/SUMMARY.md:372 src/SUMMARY.md:394 msgid "Solutions" msgstr "Soluții" -#: src/SUMMARY.md +#: src/SUMMARY.md:322 msgid "Bare Metal: Afternoon" msgstr "Bare Metal: După-amiază" -#: src/SUMMARY.md +#: src/SUMMARY.md:324 msgid "Application Processors" msgstr "Procesatori de aplicații" -#: src/SUMMARY.md src/bare-metal/aps/entry-point.md +#: src/SUMMARY.md:325 src/bare-metal/aps/entry-point.md:1 msgid "Getting Ready to Rust" msgstr "Pregătiți pentru Rust" -#: src/SUMMARY.md +#: src/SUMMARY.md:326 msgid "Inline Assembly" msgstr "Ansamblare în linie" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:327 msgid "MMIO" msgstr "MMIO" -#: src/SUMMARY.md +#: src/SUMMARY.md:328 msgid "Let's Write a UART Driver" msgstr "Să scriem un driver UART" -#: src/SUMMARY.md +#: src/SUMMARY.md:329 msgid "More Traits" msgstr "Mai multe trăsături" -#: src/SUMMARY.md +#: src/SUMMARY.md:330 msgid "A Better UART Driver" msgstr "Un driver UART mai bun" -#: src/SUMMARY.md src/bare-metal/aps/better-uart/bitflags.md -#, fuzzy +#: src/SUMMARY.md:331 src/bare-metal/aps/better-uart/bitflags.md:1 msgid "Bitflags" msgstr "Bitflags" -#: src/SUMMARY.md +#: src/SUMMARY.md:332 msgid "Multiple Registers" msgstr "Registre multiple" -#: src/SUMMARY.md src/bare-metal/aps/better-uart/driver.md -#, fuzzy +#: src/SUMMARY.md:333 src/bare-metal/aps/better-uart/driver.md:1 msgid "Driver" -msgstr "Conductor (driver)" +msgstr "Un driver UART mai bun" -#: src/SUMMARY.md +#: src/SUMMARY.md:334 src/SUMMARY.md:336 msgid "Using It" msgstr "Utilizarea acestuia" -#: src/SUMMARY.md src/bare-metal/aps/exceptions.md +#: src/SUMMARY.md:337 src/bare-metal/aps/exceptions.md:1 msgid "Exceptions" msgstr "Excepții" -#: src/SUMMARY.md src/bare-metal/useful-crates/zerocopy.md -#, fuzzy +#: src/SUMMARY.md:339 +msgid "Useful Crates" +msgstr "Crates (lăzi) utile" + +#: src/SUMMARY.md:340 src/bare-metal/useful-crates/zerocopy.md:1 msgid "`zerocopy`" -msgstr "`zerocopie`" +msgstr "`zerocopy`" -#: src/SUMMARY.md src/bare-metal/useful-crates/aarch64-paging.md -#, fuzzy +#: src/SUMMARY.md:341 src/bare-metal/useful-crates/aarch64-paging.md:1 msgid "`aarch64-paging`" msgstr "`aarch64-paging`" -#: src/SUMMARY.md src/bare-metal/useful-crates/buddy_system_allocator.md -#, fuzzy +#: src/SUMMARY.md:342 src/bare-metal/useful-crates/buddy_system_allocator.md:1 msgid "`buddy_system_allocator`" -msgstr "`buddy_system_allocator`" +msgstr "buddy_system_allocator`" -#: src/SUMMARY.md src/bare-metal/useful-crates/tinyvec.md -#, fuzzy +#: src/SUMMARY.md:343 src/bare-metal/useful-crates/tinyvec.md:1 msgid "`tinyvec`" msgstr "`tinyvec`" -#: src/SUMMARY.md src/bare-metal/useful-crates/spin.md -#, fuzzy +#: src/SUMMARY.md:344 src/bare-metal/useful-crates/spin.md:1 msgid "`spin`" -msgstr "`spin`" +msgstr "`Spin`" -#: src/SUMMARY.md -#, fuzzy +#: src/SUMMARY.md:346 msgid "`vmbase`" -msgstr "vmbase" +msgstr "`vmbase`" -#: src/SUMMARY.md +#: src/SUMMARY.md:348 msgid "RTC Driver" msgstr "Conductor RTC" -#: src/SUMMARY.md +#: src/SUMMARY.md:351 msgid "Concurrency: Morning" msgstr "Concurență: Dimineața" -#: src/SUMMARY.md src/concurrency/threads.md +#: src/SUMMARY.md:356 src/concurrency/threads.md:1 msgid "Threads" msgstr "Conversatii" -#: src/SUMMARY.md src/concurrency/scoped-threads.md -#, fuzzy +#: src/SUMMARY.md:357 src/concurrency/scoped-threads.md:1 msgid "Scoped Threads" -msgstr "Filete de acoperire" +msgstr "Fire de execuție cu scop" -#: src/SUMMARY.md src/concurrency/channels.md +#: src/SUMMARY.md:358 src/concurrency/channels.md:1 msgid "Channels" msgstr "Canale" -#: src/SUMMARY.md src/concurrency/channels/unbounded.md +#: src/SUMMARY.md:359 src/concurrency/channels/unbounded.md:1 msgid "Unbounded Channels" msgstr "Canale nerestricționate" -#: src/SUMMARY.md src/concurrency/channels/bounded.md -#, fuzzy +#: src/SUMMARY.md:360 src/concurrency/channels/bounded.md:1 msgid "Bounded Channels" msgstr "Canale delimitate" -#: src/SUMMARY.md src/concurrency/send-sync.md -#, fuzzy +#: src/SUMMARY.md:361 src/concurrency/send-sync.md:1 msgid "`Send` and `Sync`" msgstr "`Send` și `Sync`" -#: src/SUMMARY.md src/concurrency/send-sync/send.md -#, fuzzy +#: src/SUMMARY.md:362 src/concurrency/send-sync/send.md:1 msgid "`Send`" -msgstr "`Send`" +msgstr "Trimitere (send)" -#: src/SUMMARY.md src/concurrency/send-sync/sync.md -#, fuzzy +#: src/SUMMARY.md:363 src/concurrency/send-sync/sync.md:1 msgid "`Sync`" -msgstr "`Sync`" +msgstr "Sincronizare (sync)" -#: src/SUMMARY.md src/concurrency/send-sync/examples.md +#: src/SUMMARY.md:364 src/concurrency/send-sync/examples.md:1 msgid "Examples" msgstr "Exemple" -#: src/SUMMARY.md src/concurrency/shared_state.md +#: src/SUMMARY.md:365 src/concurrency/shared_state.md:1 msgid "Shared State" msgstr "Statut comun" -#: src/SUMMARY.md src/concurrency/shared_state/arc.md -#, fuzzy +#: src/SUMMARY.md:366 src/concurrency/shared_state/arc.md:1 msgid "`Arc`" msgstr "`Arc`" -#: src/SUMMARY.md src/concurrency/shared_state/mutex.md -#, fuzzy +#: src/SUMMARY.md:367 src/concurrency/shared_state/mutex.md:1 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/SUMMARY.md:368 src/memory-management/review.md:16 +#: src/error-handling/try-conversions.md:23 +#: src/concurrency/shared_state/example.md:1 msgid "Example" msgstr "Exemplu" -#: src/SUMMARY.md src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/solutions-morning.md +#: src/SUMMARY.md:370 src/SUMMARY.md:392 +#: src/exercises/concurrency/dining-philosophers.md:1 +#: src/exercises/concurrency/solutions-morning.md:3 msgid "Dining Philosophers" msgstr "Filozofii la masă" -#: src/SUMMARY.md src/exercises/concurrency/link-checker.md +#: src/SUMMARY.md:371 src/exercises/concurrency/link-checker.md:1 msgid "Multi-threaded Link Checker" msgstr "Verificator de legături cu mai multe fire de execuție" -#: src/SUMMARY.md +#: src/SUMMARY.md:374 msgid "Concurrency: Afternoon" msgstr "Concurență: După-amiază" -#: src/SUMMARY.md +#: src/SUMMARY.md:376 msgid "Async Basics" msgstr "Bazele Async" -#: src/SUMMARY.md src/async/async-await.md -#, fuzzy +#: src/SUMMARY.md:377 src/async/async-await.md:1 msgid "`async`/`await`" -msgstr "`async`/`await`" +msgstr "async/await" -#: src/SUMMARY.md src/async/futures.md +#: src/SUMMARY.md:378 src/async/futures.md:1 msgid "Futures" msgstr "Futures" -#: src/SUMMARY.md src/async/runtimes.md +#: src/SUMMARY.md:379 src/async/runtimes.md:1 #, fuzzy msgid "Runtimes" msgstr "Timpi de execuție" -#: src/SUMMARY.md src/async/runtimes/tokio.md +#: src/SUMMARY.md:380 src/async/runtimes/tokio.md:1 msgid "Tokio" msgstr "Tokio" -#: src/SUMMARY.md src/exercises/concurrency/link-checker.md src/async/tasks.md -#: src/exercises/concurrency/chat-app.md +#: src/SUMMARY.md:381 src/exercises/concurrency/link-checker.md:119 +#: src/async/tasks.md:1 src/exercises/concurrency/chat-app.md:143 msgid "Tasks" msgstr "Task-uri" -#: src/SUMMARY.md src/async/channels.md +#: src/SUMMARY.md:382 src/async/channels.md:1 msgid "Async Channels" msgstr "Canale asincrone" -#: src/SUMMARY.md +#: src/SUMMARY.md:383 msgid "Control Flow" msgstr "Fluxul de control" -#: src/SUMMARY.md src/async/control-flow/join.md +#: src/SUMMARY.md:384 src/async/control-flow/join.md:1 msgid "Join" msgstr "Alăturare (join)" -#: src/SUMMARY.md src/async/control-flow/select.md +#: src/SUMMARY.md:385 src/async/control-flow/select.md:1 msgid "Select" msgstr "Selecție (select)" -#: src/SUMMARY.md +#: src/SUMMARY.md:386 msgid "Pitfalls" msgstr "Capcane" -#: src/SUMMARY.md +#: src/SUMMARY.md:387 msgid "Blocking the Executor" msgstr "Blocarea executorului" -#: src/SUMMARY.md src/async/pitfalls/pin.md +#: src/SUMMARY.md:388 src/async/pitfalls/pin.md:1 msgid "`Pin`" -msgstr "" +msgstr "`Pin`" -#: src/SUMMARY.md src/async/pitfalls/async-traits.md +#: src/SUMMARY.md:389 src/async/pitfalls/async-traits.md:1 msgid "Async Traits" msgstr "Trăsături asincrone" -#: src/SUMMARY.md src/async/pitfalls/cancellation.md +#: src/SUMMARY.md:390 src/async/pitfalls/cancellation.md:1 msgid "Cancellation" msgstr "Anulare" -#: src/SUMMARY.md src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/SUMMARY.md:393 src/exercises/concurrency/chat-app.md:1 +#: src/exercises/concurrency/solutions-afternoon.md:104 msgid "Broadcast Chat Application" msgstr "Aplicație de chat cu difuzare" -#: src/SUMMARY.md +#: src/SUMMARY.md:396 msgid "Final Words" msgstr "Ultimele cuvinte" -#: src/SUMMARY.md src/thanks.md +#: src/SUMMARY.md:400 src/thanks.md:1 msgid "Thanks!" msgstr "Va multumim !" -#: src/SUMMARY.md src/glossary.md +#: src/SUMMARY.md:401 src/glossary.md:3 msgid "Glossary" msgstr "Glosar" -#: src/SUMMARY.md +#: src/SUMMARY.md:402 msgid "Other Resources" msgstr "Alte resurse" -#: src/SUMMARY.md src/credits.md +#: src/SUMMARY.md:403 src/credits.md:1 msgid "Credits" msgstr "Credite" -#: src/index.md +#: src/index.md:3 msgid "" "[![Build workflow](https://img.shields.io/github/actions/workflow/status/" "google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/" @@ -1292,7 +1310,7 @@ msgstr "" "img.shields.io/github/stars/google/comprehensive-rust?style=flat-square)]" "(https://github.com/google/comprehensive-rust/stargazers)" -#: src/index.md +#: src/index.md:7 msgid "" "This is a free Rust course developed by the Android team at Google. The " "course covers the full spectrum of Rust, from basic syntax to advanced " @@ -1302,7 +1320,7 @@ msgstr "" "Google. Cursul acoperă întregul spectru Rust, de la sintaxa de bază până la " "subiecte avansate, cum ar fi genericele și gestionarea erorilor." -#: src/index.md +#: src/index.md:11 msgid "" "The latest version of the course can be found at . If you are reading somewhere else, please check there " @@ -1312,7 +1330,11 @@ msgstr "" "google.github.io/comprehensive-rust/>. Dacă citiți în altă parte, vă rugăm " "să verificați acolo pentru actualizări." -#: src/index.md +#: src/index.md:15 +msgid "The course is also available [as a PDF](comprehensive-rust.pdf)." +msgstr "" + +#: src/index.md:17 msgid "" "The goal of the course is to teach you Rust. We assume you don't know " "anything about Rust and hope to:" @@ -1320,32 +1342,31 @@ msgstr "" "Scopul cursului este de a vă învăța Rust. Presupunem că nu știți nimic " "despre Rust și, la sfârșit, sperăm să:" -#: src/index.md +#: src/index.md:20 msgid "Give you a comprehensive understanding of the Rust syntax and language." msgstr "Aveți o înțelegere cuprinzătoare a sintaxei și a limbajului Rust." -#: src/index.md +#: src/index.md:21 msgid "Enable you to modify existing programs and write new programs in Rust." msgstr "" "Puteți să modificați programele existente și să scrieți programe noi în Rust." -#: src/index.md +#: src/index.md:22 msgid "Show you common Rust idioms." msgstr "Cunoașteți expresii uzuale din Rust." -#: src/index.md -#, fuzzy +#: src/index.md:24 msgid "We call the first four course days Rust Fundamentals." -msgstr "Primele trei zile de curs se numesc Rust Fundamentals." +msgstr "Primele patru zile de curs se numesc Fundamentele Rust." -#: src/index.md +#: src/index.md:26 msgid "" "Building on this, you're invited to dive into one or more specialized topics:" msgstr "" "Pornind de la acestea, sunteți invitați să aprofundați unul sau mai multe " "subiecte specializate:" -#: src/index.md +#: src/index.md:28 msgid "" "[Android](android.md): a half-day course on using Rust for Android platform " "development (AOSP). This includes interoperability with C, C++, and Java." @@ -1354,18 +1375,17 @@ msgstr "" "pentru dezvoltarea platformei Android (AOSP). Acesta include " "interoperabilitatea cu C, C++ și Java." -#: src/index.md -#, fuzzy +#: src/index.md:30 msgid "" "[Chromium](chromium.md): a half-day course on using Rust within Chromium " "based browsers. This includes interoperability with C++ and how to include " "third-party crates in Chromium." msgstr "" -"[Android](android.md): un curs de o jumătate de zi despre utilizarea Rust " -"pentru dezvoltarea platformei Android (AOSP). Acesta include " -"interoperabilitatea cu C, C++ și Java." +"[Chromium](chromium.md): un curs de o jumătate de zi despre utilizarea Rust " +"pentru navigatoarele bazate pe Chromium. Acesta include interoperabilitatea " +"cu C++ și utilizarea crate-urilor terțe în Chromium." -#: src/index.md +#: src/index.md:33 msgid "" "[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal " "(embedded) development. Both microcontrollers and application processors are " @@ -1375,7 +1395,7 @@ msgstr "" "pentru dezvoltarea bare-metal (încorporată). Sunt acoperite atât " "microcontrolerele, cât și procesoarele de aplicații." -#: src/index.md +#: src/index.md:36 msgid "" "[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We " "cover both classical concurrency (preemptively scheduling using threads and " @@ -1387,11 +1407,11 @@ msgstr "" "de execuție și mutexuri), cât și concurența async/await (multitasking " "cooperativ folosind futures)." -#: src/index.md +#: src/index.md:40 msgid "Non-Goals" msgstr "Alte obiective decât cele de bază" -#: src/index.md +#: src/index.md:42 msgid "" "Rust is a large language and we won't be able to cover all of it in a few " "days. Some non-goals of this course are:" @@ -1399,7 +1419,7 @@ msgstr "" "Rust este un limbaj mare și nu vom putea acoperi toate aspectele în câteva " "zile. Câteva dintre non-obiectivele acestui curs sunt:" -#: src/index.md +#: src/index.md:45 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]" @@ -1410,11 +1430,11 @@ msgstr "" "macros.html) și [Rust by Example](https://doc.rust-lang.org/rust-by-example/" "macros.html)." -#: src/index.md +#: src/index.md:50 msgid "Assumptions" msgstr "Ipoteze" -#: src/index.md +#: src/index.md:52 msgid "" "The course assumes that you already know how to program. Rust is a " "statically-typed language and we will sometimes make comparisons with C and " @@ -1424,7 +1444,7 @@ msgstr "" "limbaj cu tipare statică și uneori vom face comparații cu C și C++ pentru a " "explica mai bine sau a contrasta abordarea Rust." -#: src/index.md +#: src/index.md:56 msgid "" "If you know how to program in a dynamically-typed language such as Python or " "JavaScript, then you will be able to follow along just fine too." @@ -1432,7 +1452,7 @@ msgstr "" "Dacă știți să programați într-un limbaj cu tipuri dinamice, cum ar fi Python " "sau JavaScript, atunci veți putea să vă descurcați foarte bine." -#: src/index.md +#: src/index.md:61 msgid "" "This is an example of a _speaker note_. We will use these to add additional " "information to the slides. This could be key points which the instructor " @@ -1443,11 +1463,11 @@ msgstr "" "pe care instructorul ar trebui să le abordeze, precum și răspunsuri la " "întrebări tipice care apar în clasă." -#: src/running-the-course.md src/running-the-course/course-structure.md +#: src/running-the-course.md:3 src/running-the-course/course-structure.md:3 msgid "This page is for the course instructor." msgstr "Această pagină este destinată instructorului de curs." -#: src/running-the-course.md +#: src/running-the-course.md:5 msgid "" "Here is a bit of background information about how we've been running the " "course internally at Google." @@ -1455,27 +1475,23 @@ msgstr "" "Iată câteva informații de fond despre modul în care am desfășurat cursul în " "cadrul Google." -#: src/running-the-course.md -#, fuzzy +#: src/running-the-course.md:8 msgid "" "We typically run classes from 9:00 am to 4:00 pm, with a 1 hour lunch break " "in the middle. This leaves 3 hours for the morning class and 3 hours for the " "afternoon class. Both sessions contain multiple breaks and time for students " "to work on exercises." msgstr "" -"De obicei, cursurile se desfășoară între orele 10:00 și 16:00, cu o pauză de " -"masă de o oră la mijloc. Astfel, rămân 2,5 ore pentru cursul de dimineață și " -"2,5 ore pentru cursul de după-amiază. Rețineți că aceasta este doar o " -"recomandare: puteți, de asemenea, să petreceți 3 ore la sesiunea de " -"dimineață pentru a le oferi oamenilor mai mult timp pentru exerciții. " -"Dezavantajul unei sesiuni mai lungi este că participanții pot deveni foarte " -"obosiți după 6 ore întregi de curs după-amiaza." +"De obicei, cursurile se desfășoară între orele 9:00 și 16:00, cu o pauză de " +"masă de o oră la mijloc. Astfel, rămân 3 ore pentru cursul de dimineață și 3 " +"ore pentru cursul de după-amiază. Ambele sesiuni includ multiple pauze " +"pentru a le permite cursanților să lucreze la exerciții." -#: src/running-the-course.md +#: src/running-the-course.md:13 msgid "Before you run the course, you will want to:" msgstr "Înainte de a parcurge cursul, veți dori să:" -#: src/running-the-course.md +#: src/running-the-course.md:15 msgid "" "Make yourself familiar with the course material. We've included speaker " "notes to help highlight the key points (please help us by contributing more " @@ -1490,20 +1506,19 @@ msgstr "" "link-ul cu o săgeată mică de lângă \"Speaker Notes\"). În acest fel, veți " "avea un ecran curat pentru a prezenta în fața clasei." -#: src/running-the-course.md -#, fuzzy +#: src/running-the-course.md:21 msgid "" "Decide on the dates. Since the course takes four days, we recommend that you " "schedule the days over two weeks. Course participants have said that they " "find it helpful to have a gap in the course since it helps them process all " "the information we give them." msgstr "" -"Decideți datele. Deoarece cursul durează cel puțin trei zile întregi, vă " -"recomandăm să programați zilele pe parcursul a două săptămâni. Participanții " -"la curs au spus că li se pare util să existe un interval în timpul cursului, " -"deoarece îi ajută să proceseze toate informațiile pe care le oferim." +"Decideți datele. Deoarece cursul durează patru zile\\i, vă recomandăm să " +"programați zilele pe parcursul a două săptămâni. Participanții la curs au " +"spus că li se pare util să existe un interval în timpul cursului, deoarece " +"îi ajută să proceseze toate informațiile pe care le oferim." -#: src/running-the-course.md +#: src/running-the-course.md:26 msgid "" "Find a room large enough for your in-person participants. We recommend a " "class size of 15-25 people. That's small enough that people are comfortable " @@ -1522,7 +1537,7 @@ msgstr "" "special, în calitate de instructor, veți face o mulțime de live-coding, așa " "că un pupitru nu vă va fi de mare ajutor." -#: src/running-the-course.md +#: src/running-the-course.md:34 msgid "" "On the day of your course, show up to the room a little early to set things " "up. We recommend presenting directly using `mdbook serve` running on your " @@ -1539,7 +1554,7 @@ msgstr "" "laptopului vă va permite, de asemenea, să corectați greșelile de tipar pe " "măsură ce dumneavoastră sau participanții la curs le descoperiți." -#: src/running-the-course.md +#: src/running-the-course.md:40 msgid "" "Let people solve the exercises by themselves or in small groups. We " "typically spend 30-45 minutes on exercises in the morning and in the " @@ -1557,7 +1572,7 @@ msgstr "" "anunțați clasa și oferiți o soluție, de exemplu, arătând unde se pot găsi " "informațiile relevante în biblioteca standard." -#: src/running-the-course.md +#: src/running-the-course.md:48 msgid "" "That is all, good luck running the course! We hope it will be as much fun " "for you as it has been for us!" @@ -1565,8 +1580,7 @@ msgstr "" "Asta e tot, mult succes în prezentarea cursului! Sperăm că va fi la fel de " "distractiv pentru voi cum a fost pentru noi!" -#: src/running-the-course.md -#, fuzzy +#: src/running-the-course.md:51 msgid "" "Please [provide feedback](https://github.com/google/comprehensive-rust/" "discussions/86) afterwards so that we can keep improving the course. We " @@ -1575,180 +1589,197 @@ msgid "" "google/comprehensive-rust/discussions/100)!" msgstr "" "Vă rugăm să [oferiți sugestii](https://github.com/google/comprehensive-rust/" -"discussions/86) după aceea, astfel încât să putem îmbunătăți cursul. Ne-ar " -"plăcea să aflăm ce a funcționat bine pentru dvs. și ce poate fi îmbunătățit. " +"discussions/86) după aceea, astfel încât să putem îmbunătăți cursul. Dorim " +"să aflăm ce a funcționat bine pentru dumneavoastră și ce putem îmbunătăți. " "Studenții dumneavoastră sunt, de asemenea, foarte bineveniți să [ne trimită " "feedback](https://github.com/google/comprehensive-rust/discussions/100)!" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:5 msgid "Rust Fundamentals" msgstr "Fundamentele Rust" -#: src/running-the-course/course-structure.md -#, fuzzy +#: src/running-the-course/course-structure.md:7 msgid "" "The first four days make up [Rust Fundamentals](../welcome-day-1.md). The " "days are fast paced and we cover a lot of ground!" msgstr "" -"Primele trei zile alcătuiesc [Fundamentele Rust](../welcome-day-1.md). " -"Zilele se desfășoară într-un ritm rapid și acoperim o mulțime de subiecte:" +"Primele patru zile alcătuiesc [Fundamentele Rust](../welcome-day-1.md). " +"Cursul se desfășoară într-un ritm rapid și acoperim o mulțime de subiecte!" -#: src/running-the-course/course-structure.md -#, fuzzy +#: src/running-the-course/course-structure.md:10 msgid "Course schedule:" -msgstr "Structura cursului" +msgstr "Programul cursului:" -#: src/running-the-course/course-structure.md -msgid "Day 1 Morning (3 hours, including breaks)" -msgstr "" +#: src/running-the-course/course-structure.md:11 +#, fuzzy +msgid "Day 1 Morning (2 hours and 5 minutes, including breaks)" +msgstr "Ziua 3 Dimineața (2 ore și 15 minute, inclusiv pauzele)" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:12 msgid "[Welcome](../welcome-day-1.md) (5 minutes)" -msgstr "" +msgstr "[Introducere](../welcome-day-1.md) (5 minute)" -#: src/running-the-course/course-structure.md -msgid "[Hello, World](../hello-world.md) (20 minutes)" -msgstr "" +#: src/running-the-course/course-structure.md:13 +#, fuzzy +msgid "[Hello, World](../hello-world.md) (15 minutes)" +msgstr "[Hello, World](../hello-world.md) (20 minute)" -#: src/running-the-course/course-structure.md -msgid "[Types and Values](../types-and-values.md) (1 hour and 5 minutes)" -msgstr "" +#: src/running-the-course/course-structure.md:14 +#, fuzzy +msgid "[Types and Values](../types-and-values.md) (40 minutes)" +msgstr "[Tipuri și valori](../types-and-values.md) (1 oră și 5 minute)" -#: src/running-the-course/course-structure.md -msgid "[Control Flow Basics](../control-flow-basics.md) (1 hour)" -msgstr "" +#: src/running-the-course/course-structure.md:15 +#, fuzzy +msgid "[Control Flow Basics](../control-flow-basics.md) (40 minutes)" +msgstr "[Bazele fluxului de control](../control-flow-basics.md) (1 oră)" -#: src/running-the-course/course-structure.md -msgid "Day 1 Afternoon (2 hours and 55 minutes, including breaks)" -msgstr "" +#: src/running-the-course/course-structure.md:16 +#, fuzzy +msgid "Day 1 Afternoon (2 hours and 35 minutes, including breaks)" +msgstr "Ziua 1 După-amiaza (2 ore și 55 de minute, inclusiv pauzele)" -#: src/running-the-course/course-structure.md -msgid "[Tuples and Arrays](../tuples-and-arrays.md) (1 hour)" -msgstr "" +#: src/running-the-course/course-structure.md:17 +#, fuzzy +msgid "[Tuples and Arrays](../tuples-and-arrays.md) (35 minutes)" +msgstr "[Tupluri și array-uri](../tupluri-și-array-uri.md) (1 oră)" -#: src/running-the-course/course-structure.md -msgid "[References](../references.md) (50 minutes)" -msgstr "" +#: src/running-the-course/course-structure.md:18 +#, fuzzy +msgid "[References](../references.md) (55 minutes)" +msgstr "[Referințe](../references.md) (50 minute)" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:19 msgid "[User-Defined Types](../user-defined-types.md) (50 minutes)" -msgstr "" +msgstr "[Tipuri definite de utilizator](../user-defined-types.md) (50 minute)" -#: src/running-the-course/course-structure.md -msgid "Day 2 Morning (3 hours and 5 minutes, including breaks)" -msgstr "" +#: src/running-the-course/course-structure.md:20 +#, fuzzy +msgid "Day 2 Morning (2 hours and 55 minutes, including breaks)" +msgstr "Ziua 2 Dimineața (3 ore și 5 minute, inclusiv pauzele)" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:21 msgid "[Welcome](../welcome-day-2.md) (3 minutes)" -msgstr "" +msgstr "[Introducere](../welcome-day-2.md) (3 minute)" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:22 #, fuzzy -msgid "[Pattern Matching](../pattern-matching.md) (50 minutes)" -msgstr "" -"Consultați [pattern matching](../pattern-matching.md) pentru mai multe " -"detalii despre tipare în Rust." +msgid "[Pattern Matching](../pattern-matching.md) (1 hour)" +msgstr "[Potrivirea șabloanelor](../pattern-matching.md) (50 minute)" -#: src/running-the-course/course-structure.md -msgid "[Methods and Traits](../methods-and-traits.md) (55 minutes)" -msgstr "" +#: src/running-the-course/course-structure.md:23 +#, fuzzy +msgid "[Methods and Traits](../methods-and-traits.md) (50 minutes)" +msgstr "[Metode și trăsături](../methods-and-traits.md) (55 minute)" -#: src/running-the-course/course-structure.md -msgid "[Generics](../generics.md) (45 minutes)" -msgstr "" +#: src/running-the-course/course-structure.md:24 +#, fuzzy +msgid "[Generics](../generics.md) (40 minutes)" +msgstr "[Generice](../generics.md) (45 minute)" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:25 #, fuzzy -msgid "Day 2 Afternoon (3 hours, including breaks)" -msgstr "Ziua 2 Exerciții de după-amiază" +msgid "Day 2 Afternoon (3 hours and 10 minutes, including breaks)" +msgstr "Ziua 3 După-amiaza (2 ore și 20 de minute, inclusiv pauzele)" -#: src/running-the-course/course-structure.md -msgid "[Standard Library Types](../std-types.md) (1 hour and 10 minutes)" -msgstr "" +#: src/running-the-course/course-structure.md:26 +#, fuzzy +msgid "[Standard Library Types](../std-types.md) (1 hour and 20 minutes)" +msgstr "[Tipuri de bibliotecă standard](../std-types.md) (1 oră și 10 minute)" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:27 msgid "[Standard Library Traits](../std-traits.md) (1 hour and 40 minutes)" msgstr "" +"[Trăsături ale bibliotecii standard](../std-traits.md) (1 oră și 40 de " +"minute)" -#: src/running-the-course/course-structure.md -msgid "Day 3 Morning (2 hours and 15 minutes, including breaks)" -msgstr "" +#: src/running-the-course/course-structure.md:28 +#, fuzzy +msgid "Day 3 Morning (2 hours and 20 minutes, including breaks)" +msgstr "Ziua 3 Dimineața (2 ore și 15 minute, inclusiv pauzele)" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:29 msgid "[Welcome](../welcome-day-3.md) (3 minutes)" -msgstr "" +msgstr "[Introducere](../welcome-day-3.md) (3 minute)" -#: src/running-the-course/course-structure.md -msgid "[Memory Management](../memory-management.md) (1 hour and 10 minutes)" -msgstr "" +#: src/running-the-course/course-structure.md:30 +#, fuzzy +msgid "[Memory Management](../memory-management.md) (1 hour)" +msgstr "[Managementul memoriei](../memory-management.md) (1 oră și 10 minute)" -#: src/running-the-course/course-structure.md -msgid "[Smart Pointers](../smart-pointers.md) (45 minutes)" -msgstr "" +#: src/running-the-course/course-structure.md:31 +#, fuzzy +msgid "[Smart Pointers](../smart-pointers.md) (55 minutes)" +msgstr "[Pointeri inteligenți](../smart-pointers.md) (45 minute)" -#: src/running-the-course/course-structure.md -msgid "Day 3 Afternoon (2 hours and 20 minutes, including breaks)" -msgstr "" +#: src/running-the-course/course-structure.md:32 +#, fuzzy +msgid "Day 3 Afternoon (1 hour and 50 minutes, including breaks)" +msgstr "Ziua 3 După-amiaza (2 ore și 20 de minute, inclusiv pauzele)" -#: src/running-the-course/course-structure.md -msgid "[Borrowing](../borrowing.md) (1 hour)" -msgstr "" +#: src/running-the-course/course-structure.md:33 +#, fuzzy +msgid "[Borrowing](../borrowing.md) (50 minutes)" +msgstr "[Împrumut](../împrumut.md) (1 oră)" -#: src/running-the-course/course-structure.md -msgid "" -"[Slices and Lifetimes](../slices-and-lifetimes.md) (1 hour and 10 minutes)" -msgstr "" +#: src/running-the-course/course-structure.md:34 +#, fuzzy +msgid "[Lifetimes](../lifetimes.md) (50 minutes)" +msgstr "[Referințe](../references.md) (50 minute)" -#: src/running-the-course/course-structure.md -msgid "Day 4 Morning (3 hours and 5 minutes, including breaks)" -msgstr "" +#: src/running-the-course/course-structure.md:35 +#, fuzzy +msgid "Day 4 Morning (2 hours and 40 minutes, including breaks)" +msgstr "Ziua 4 Dimineața (3 ore și 5 minute, inclusiv pauzele)" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:36 msgid "[Welcome](../welcome-day-4.md) (3 minutes)" -msgstr "" +msgstr "[Intorducere](../welcome-day-4.md) (3 minute)" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:37 msgid "[Iterators](../iterators.md) (45 minutes)" -msgstr "" +msgstr "[Iteratori](../iteratori.md) (45 minute)" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:38 msgid "[Modules](../modules.md) (40 minutes)" -msgstr "" +msgstr "[Module](../modules.md) (40 minute)" -#: src/running-the-course/course-structure.md -msgid "[Testing](../testing.md) (1 hour and 5 minutes)" -msgstr "" +#: src/running-the-course/course-structure.md:39 +#, fuzzy +msgid "[Testing](../testing.md) (45 minutes)" +msgstr "[Testare](../testing.md) (1 oră și 5 minute)" -#: src/running-the-course/course-structure.md -msgid "Day 4 Afternoon (2 hours, including breaks)" -msgstr "" +#: src/running-the-course/course-structure.md:40 +#, fuzzy +msgid "Day 4 Afternoon (2 hours and 10 minutes, including breaks)" +msgstr "Ziua 3 După-amiaza (2 ore și 20 de minute, inclusiv pauzele)" -#: src/running-the-course/course-structure.md -msgid "[Error Handling](../error-handling.md) (45 minutes)" -msgstr "" +#: src/running-the-course/course-structure.md:41 +#, fuzzy +msgid "[Error Handling](../error-handling.md) (55 minutes)" +msgstr "[Gestionarea erorilor](../error-handling.md) (45 minute)" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:42 msgid "[Unsafe Rust](../unsafe-rust.md) (1 hour and 5 minutes)" -msgstr "" +msgstr "[Unsafe Rust](../unsafe-rust.md) (1 oră și 5 minute)" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:45 msgid "Deep Dives" msgstr "Subiecte aprofundate" -#: src/running-the-course/course-structure.md -#, fuzzy +#: src/running-the-course/course-structure.md:47 msgid "" "In addition to the 4-day class on Rust Fundamentals, we cover some more " "specialized topics:" msgstr "" -"În plus față de cursul de 3 zile despre fundamentele Rust, abordăm câteva " +"În plus față de cursul de 4 zile despre fundamentele Rust, abordăm câteva " "subiecte mai specializate:" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:50 msgid "Rust in Android" msgstr "Rust în Android" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:52 msgid "" "The [Rust in Android](../android.md) deep dive is a half-day course on using " "Rust for Android platform development. This includes interoperability with " @@ -1758,7 +1789,7 @@ msgstr "" "utilizarea Rust pentru dezvoltarea platformei Android. Acesta include " "interoperabilitatea cu C, C++ și Java." -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:56 msgid "" "You will need an [AOSP checkout](https://source.android.com/docs/setup/" "download/downloading). Make a checkout of the [course repository](https://" @@ -1773,7 +1804,7 @@ msgstr "" "că sistemul de compilare Android vede fișierele `Android.bp` din `src/" "android/`." -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:61 msgid "" "Ensure that `adb sync` works with your emulator or real device and pre-build " "all Android examples using `src/android/build_all.sh`. Read the script to " @@ -1784,31 +1815,38 @@ msgstr "" "sh`. Citiți scriptul pentru a vedea comenzile pe care le execută și " "asigurați-vă că acestea funcționează atunci când le executați manual." -#: src/running-the-course/course-structure.md -#, fuzzy +#: src/running-the-course/course-structure.md:68 msgid "Rust in Chromium" -msgstr "Rust în Android" +msgstr "Rust în Chromium" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:70 msgid "" "The [Rust in Chromium](../chromium.md) deep dive is a half-day course on " "using Rust as part of the Chromium browser. It includes using Rust in " "Chromium's `gn` build system, bringing in third-party libraries (\"crates\") " "and C++ interoperability." msgstr "" +"[Rust în Chromium](../chromium.md) este un curs aprofundat de o jumătate de " +"zi despre utilizarea Rust ca parte a browserului Chromium. Acesta include " +"utilizarea Rust în sistemul de compilare `gn` al Chromium, aducerea de " +"biblioteci terțe (\"crates\") și interoperabilitatea C++." -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:75 msgid "" "You will need to be able to build Chromium --- a debug, component build is " "[recommended](../chromium/setup.md) for speed but any build will work. " "Ensure that you can run the Chromium browser that you've built." msgstr "" +"Va trebui să puteți construi Chromium --- este [recomandat](../chromium/" +"setup.md) un build de depanare, de componente pentru viteză, dar orice build " +"va funcționa. Asigurați-vă că puteți rula browserul Chromium pe care l-ați " +"construit." -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:79 msgid "Bare-Metal Rust" msgstr "Rust direct pe placă" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:81 msgid "" "The [Bare-Metal Rust](../bare-metal.md) deep dive is a full day class on " "using Rust for bare-metal (embedded) development. Both microcontrollers and " @@ -1818,7 +1856,7 @@ msgstr "" "despre utilizarea Rust pentru dezvoltarea bare-metal (embedded). Sunt " "acoperite atât microcontrolerele, cât și procesoarele de aplicații." -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:85 msgid "" "For the microcontroller part, you will need to buy the [BBC micro:bit]" "(https://microbit.org/) v2 development board ahead of time. Everybody will " @@ -1830,11 +1868,11 @@ msgstr "" "să instaleze o serie de pachete, așa cum este descris pe [pagina de bun " "venit](../bare-metal.md)." -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:90 msgid "Concurrency in Rust" msgstr "Concurență în Rust" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:92 msgid "" "The [Concurrency in Rust](../concurrency.md) deep dive is a full day class " "on classical as well as `async`/`await` concurrency." @@ -1842,7 +1880,7 @@ msgstr "" "[Concurența în Rust] (../concurrency.md) este un curs de o zi întreagă " "despre concurența clasică, precum și despre concurența `async`/`await`." -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:95 msgid "" "You will need a fresh crate set up and the dependencies downloaded and ready " "to go. You can then copy/paste the examples into `src/main.rs` to experiment " @@ -1852,11 +1890,11 @@ msgstr "" "pregătite. Puteți apoi să copiați exemplele în `src/main.rs` pentru a " "experimenta cu ele:" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:106 msgid "Format" msgstr "Format" -#: src/running-the-course/course-structure.md +#: src/running-the-course/course-structure.md:108 msgid "" "The course is meant to be very interactive and we recommend letting the " "questions drive the exploration of Rust!" @@ -1864,50 +1902,50 @@ msgstr "" "Cursul se dorește a fi foarte interactiv și vă recomandăm să lăsați " "întrebările să conducă explorarea Rust!" -#: src/running-the-course/keyboard-shortcuts.md +#: src/running-the-course/keyboard-shortcuts.md:3 msgid "There are several useful keyboard shortcuts in mdBook:" msgstr "În mdBook există mai multe comenzi rapide utile de la tastatură:" -#: src/running-the-course/keyboard-shortcuts.md +#: src/running-the-course/keyboard-shortcuts.md:5 msgid "Arrow-Left" msgstr "Săgeată-stânga" -#: src/running-the-course/keyboard-shortcuts.md +#: src/running-the-course/keyboard-shortcuts.md:5 msgid ": Navigate to the previous page." msgstr ": Navigați la pagina anterioară." -#: src/running-the-course/keyboard-shortcuts.md +#: src/running-the-course/keyboard-shortcuts.md:6 msgid "Arrow-Right" msgstr "Săgeată-dreapta" -#: src/running-the-course/keyboard-shortcuts.md +#: src/running-the-course/keyboard-shortcuts.md:6 msgid ": Navigate to the next page." msgstr ": Navigați la pagina următoare." -#: src/running-the-course/keyboard-shortcuts.md src/cargo/code-samples.md +#: src/running-the-course/keyboard-shortcuts.md:7 src/cargo/code-samples.md:19 msgid "Ctrl + Enter" msgstr "Ctrl + Enter" -#: src/running-the-course/keyboard-shortcuts.md +#: src/running-the-course/keyboard-shortcuts.md:7 msgid ": Execute the code sample that has focus." msgstr ": Executați mostra de cod care are focusul." -#: src/running-the-course/keyboard-shortcuts.md +#: src/running-the-course/keyboard-shortcuts.md:8 msgid "s" msgstr "S" -#: src/running-the-course/keyboard-shortcuts.md +#: src/running-the-course/keyboard-shortcuts.md:8 msgid ": Activate the search bar." msgstr ": Activați bara de căutare." -#: src/running-the-course/translations.md +#: src/running-the-course/translations.md:3 msgid "" "The course has been translated into other languages by a set of wonderful " "volunteers:" msgstr "" "Cursul a fost tradus în alte limbi de către o serie de voluntari minunați:" -#: src/running-the-course/translations.md +#: src/running-the-course/translations.md:6 msgid "" "[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) " "by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github." @@ -1919,7 +1957,7 @@ msgstr "" "com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes) și " "[@henrif75](https://github.com/henrif75)." -#: src/running-the-course/translations.md +#: src/running-the-course/translations.md:8 msgid "" "[Chinese (Simplified)](https://google.github.io/comprehensive-rust/zh-CN/) " "by [@suetfei](https://github.com/suetfei), [@wnghl](https://github.com/" @@ -1935,7 +1973,7 @@ msgstr "" "github.com/superwhd), [@SketchK](https://github.com/SketchK), și [@nodmp]" "(https://github.com/nodmp)." -#: src/running-the-course/translations.md +#: src/running-the-course/translations.md:10 msgid "" "[Chinese (Traditional)](https://google.github.io/comprehensive-rust/zh-TW/) " "by [@hueich](https://github.com/hueich), [@victorhsieh](https://github.com/" @@ -1949,17 +1987,19 @@ msgstr "" "github.com/kuanhungchen), și [@johnathan79717](https://github.com/" "johnathan79717)." -#: src/running-the-course/translations.md +#: src/running-the-course/translations.md:12 +#, fuzzy msgid "" "[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]" -"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), and " -"[@jooyunghan](https://github.com/jooyunghan)." +"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp), " +"[@jooyunghan](https://github.com/jooyunghan), and [@namhyung](https://github." +"com/namhyung)." msgstr "" "[Coreană](https://google.github.io/comprehensive-rust/ko/) de [@keispace]" "(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp) și " "[@jooyunghan](https://github.com/jooyunghan)." -#: src/running-the-course/translations.md +#: src/running-the-course/translations.md:13 msgid "" "[Spanish](https://google.github.io/comprehensive-rust/es/) by [@deavid]" "(https://github.com/deavid)." @@ -1967,18 +2007,18 @@ msgstr "" "[Spaniolă](https://google.github.io/comprehensive-rust/es/) de [@deavid]" "(https://github.com/deavid)." -#: src/running-the-course/translations.md +#: src/running-the-course/translations.md:15 msgid "" "Use the language picker in the top-right corner to switch between languages." msgstr "" "Utilizați selectorul de limbă din colțul din dreapta sus pentru a comuta " "între limbi." -#: src/running-the-course/translations.md +#: src/running-the-course/translations.md:17 msgid "Incomplete Translations" msgstr "Traduceri incomplete" -#: src/running-the-course/translations.md +#: src/running-the-course/translations.md:19 msgid "" "There is a large number of in-progress translations. We link to the most " "recently updated translations:" @@ -1986,7 +2026,7 @@ msgstr "" "Există un număr mare de traduceri în curs de realizare. Iată cele mai " "recente traduceri actualizate:" -#: src/running-the-course/translations.md +#: src/running-the-course/translations.md:22 msgid "" "[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]" "(https://github.com/raselmandol)." @@ -1994,7 +2034,7 @@ msgstr "" "[Bengaleză](https://google.github.io/comprehensive-rust/bn/) de " "[@raselmandol](https://github.com/raselmandol)." -#: src/running-the-course/translations.md +#: src/running-the-course/translations.md:23 msgid "" "[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]" "(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen)." @@ -2002,7 +2042,7 @@ msgstr "" "[Franceză](https://google.github.io/comprehensive-rust/fr/) de [@KookaS]" "(https://github.com/KookaS) și [@vcaen](https://github.com/vcaen)." -#: src/running-the-course/translations.md +#: src/running-the-course/translations.md:24 msgid "" "[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]" "(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw)." @@ -2010,7 +2050,7 @@ msgstr "" "[Germană](https://google.github.io/comprehensive-rust/de/) de [@Throvn]" "(https://github.com/Throvn) și [@ronaldfw](https://github.com/ronaldfw)." -#: src/running-the-course/translations.md +#: src/running-the-course/translations.md:25 msgid "" "[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]" "(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/" @@ -2020,7 +2060,17 @@ msgstr "" "(https://github.com/CoinEZ) și [@momotaro1105](https://github.com/" "momotaro1105)." -#: src/running-the-course/translations.md +#: src/running-the-course/translations.md:26 +#, fuzzy +msgid "" +"[Italian](https://google.github.io/comprehensive-rust/it/) by " +"[@henrythebuilder](https://github.com/henrythebuilder) and [@detro](https://" +"github.com/detro)." +msgstr "" +"[Germană](https://google.github.io/comprehensive-rust/de/) de [@Throvn]" +"(https://github.com/Throvn) și [@ronaldfw](https://github.com/ronaldfw)." + +#: src/running-the-course/translations.md:28 msgid "" "If you want to help with this effort, please see [our instructions](https://" "github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to " @@ -2033,7 +2083,7 @@ msgstr "" "coordonate pe [issue tracker](https://github.com/google/comprehensive-rust/" "issues/282)." -#: src/cargo.md +#: src/cargo.md:3 msgid "" "When you start reading about Rust, you will soon meet [Cargo](https://doc." "rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build " @@ -2047,15 +2097,15 @@ msgstr "" "prezentare generală a ceea ce este Cargo și a modului în care se integrează " "în ecosistemul mai larg și cum se încadrează în acest curs de formare." -#: src/cargo.md +#: src/cargo.md:9 msgid "Installation" msgstr "Instalare" -#: src/cargo.md +#: src/cargo.md:11 msgid "**Please follow the instructions on .**" msgstr "**Vă rugăm să urmați instrucțiunile de pe .**" -#: src/cargo.md +#: src/cargo.md:13 msgid "" "This will give you the Cargo build tool (`cargo`) and the Rust compiler " "(`rustc`). You will also get `rustup`, a command line utility that you can " @@ -2066,7 +2116,7 @@ msgstr "" "de linie de comandă pe care îl puteți utiliza pentru a instala la diferite " "versiuni de compilator." -#: src/cargo.md +#: src/cargo.md:17 msgid "" "After installing Rust, you should configure your editor or IDE to work with " "Rust. Most editors do this by talking to [rust-analyzer](https://rust-" @@ -2085,7 +2135,7 @@ msgstr "" "html#vimneovim) și multe altele. Există, de asemenea, un alt IDE disponibil, " "numit [RustRover](https://www.jetbrains.com/rust/)." -#: src/cargo.md +#: src/cargo.md:25 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 " @@ -2097,18 +2147,18 @@ msgstr "" "`apt`. Dar veți avea acces la o versiune Rust învechită care poate duce la " "un comportament neașteptat. Comanda ar fi:" -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:1 msgid "The Rust Ecosystem" msgstr "Ecosistemul Rust" -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:3 msgid "" "The Rust ecosystem consists of a number of tools, of which the main ones are:" msgstr "" "Ecosistemul Rust este format dintr-un număr de instrumente, dintre care " "principalele sunt:" -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:5 msgid "" "`rustc`: the Rust compiler which turns `.rs` files into binaries and other " "intermediate formats." @@ -2116,7 +2166,7 @@ msgstr "" "`rustc`: compilatorul Rust care transformă fișierele `.rs` în fișiere binare " "și alte formate intermediare." -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:8 msgid "" "`cargo`: the Rust dependency manager and build tool. Cargo knows how to " "download dependencies, usually hosted on , and it will " @@ -2129,8 +2179,7 @@ msgstr "" "Cargo vine, de asemenea, cu un instrument de rulat testele încorporat care " "este folosit pentru a executa testele unitare." -#: src/cargo/rust-ecosystem.md -#, fuzzy +#: src/cargo/rust-ecosystem.md:13 msgid "" "`rustup`: the Rust toolchain installer and updater. This tool is used to " "install and update `rustc` and `cargo` when new versions of Rust are " @@ -2145,15 +2194,14 @@ msgstr "" "multe versiuni de Rust instalate în același timp, iar `rustup` vă va permite " "să treceți de la una la alta în funcție de necesități." -#: src/cargo/rust-ecosystem.md src/hello-world/hello-world.md -#: src/tuples-and-arrays/tuples-and-arrays.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/concurrency/threads.md -#: src/async/async-await.md +#: src/cargo/rust-ecosystem.md:21 src/types-and-values/hello-world.md:26 +#: src/references/exclusive.md:20 src/pattern-matching/destructuring.md:69 +#: src/memory-management/move.md:153 src/error-handling/try.md:53 +#: src/android/setup.md:18 src/async/async-await.md:25 msgid "Key points:" msgstr "Puncte-cheie:" -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:23 msgid "" "Rust has a rapid release schedule with a new release coming out every six " "weeks. New releases maintain backwards compatibility with old releases --- " @@ -2163,13 +2211,13 @@ msgstr "" "șase săptămâni. Noile versiuni mențin compatibilitatea cu versiunile vechi " "și adaugă noi funcționalități." -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:27 msgid "" "There are three release channels: \"stable\", \"beta\", and \"nightly\"." msgstr "" "Există trei canale de actualizare: \"stable\", \"beta\" și \"nightly\"." -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:29 msgid "" "New features are being tested on \"nightly\", \"beta\" is what becomes " "\"stable\" every six weeks." @@ -2177,7 +2225,7 @@ msgstr "" "Noile caracteristici sunt testate pe \"nightly\", \"beta\" este ceea ce " "devine \"stabil\" la fiecare șase săptămâni." -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:32 msgid "" "Dependencies can also be resolved from alternative [registries](https://doc." "rust-lang.org/cargo/reference/registries.html), git, folders, and more." @@ -2185,7 +2233,7 @@ msgstr "" "De asemenea, dependențele pot fi rezolvate din [registre](https://doc.rust-" "lang.org/cargo/reference/registries.html) alternative, git, dosare și altele." -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:35 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." @@ -2194,7 +2242,7 @@ msgstr "" "ediția curentă este Rust 2021. Edițiile anterioare au fost Rust 2015 și Rust " "2018." -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:38 msgid "" "The editions are allowed to make backwards incompatible changes to the " "language." @@ -2202,7 +2250,7 @@ msgstr "" "Noile edițiile au dreptul de a face modificări ale limbajului incompatibile " "cu versiuni mai vechi." -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:41 msgid "" "To prevent breaking code, editions are opt-in: you select the edition for " "your crate via the `Cargo.toml` file." @@ -2211,7 +2259,7 @@ msgstr "" "ediția pentru crate-ul dumneavoastră prin intermediul fișierului `Cargo." "toml`." -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:44 msgid "" "To avoid splitting the ecosystem, Rust compilers can mix code written for " "different editions." @@ -2219,7 +2267,7 @@ msgstr "" "Pentru a evita divizarea ecosistemului, compilatoarele Rust pot amesteca " "coduri scrise pentru ediții diferite." -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:47 msgid "" "Mention that it is quite rare to ever use the compiler directly not through " "`cargo` (most users never do)." @@ -2227,33 +2275,31 @@ msgstr "" "Menționăm că este destul de rar să folosiți compilatorul direct și nu prin " "`cargo` (majoritatea utilizatorilor nu o fac niciodată)." -#: src/cargo/rust-ecosystem.md -#, fuzzy +#: src/cargo/rust-ecosystem.md:50 msgid "" "It might be worth alluding that Cargo itself is an extremely powerful and " "comprehensive tool. It is capable of many advanced features including but " "not limited to:" msgstr "" -"Este util să menționăm că Cargo în sine este un instrument extrem de " -"puternic și cuprinzător. Acesta are multe caracteristici avansate, " -"incluzând: " +"Cargo este un instrument extrem de puternic și cuprinzător. Acesta are multe " +"caracteristici avansate, incluzând:" -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:53 msgid "Project/package structure" msgstr "Structura proiectului/pachetului" -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:54 msgid "[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)" msgstr "" "[spații de lucru](https://doc.rust-lang.org/cargo/reference/workspaces.html)" -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:55 msgid "Dev Dependencies and Runtime Dependency management/caching" msgstr "" "Gestionarea/arhivarea dependențelor de dezvoltare și a dependențelor de timp " "de execuție" -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:56 msgid "" "[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts." "html)" @@ -2261,7 +2307,7 @@ msgstr "" "[scripturile de build](https://doc.rust-lang.org/cargo/reference/build-" "scripts.html)" -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:57 msgid "" "[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install." "html)" @@ -2269,7 +2315,7 @@ msgstr "" "[instalarea globală](https://doc.rust-lang.org/cargo/commands/cargo-install." "html)" -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:58 msgid "" "It is also extensible with sub command plugins as well (such as [cargo " "clippy](https://github.com/rust-lang/rust-clippy))." @@ -2277,18 +2323,18 @@ msgstr "" "Este, de asemenea, extensibil cu pluginuri de subcomandă (cum ar fi [cargo " "clippy](https://github.com/rust-lang/rust-clippy))." -#: src/cargo/rust-ecosystem.md +#: src/cargo/rust-ecosystem.md:60 msgid "" "Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)" msgstr "" "Citiți mai multe din [cartea oficială Cargo](https://doc.rust-lang.org/" "cargo/)" -#: src/cargo/code-samples.md +#: src/cargo/code-samples.md:1 msgid "Code Samples in This Training" msgstr "Exemple de cod în aceast curs" -#: src/cargo/code-samples.md +#: src/cargo/code-samples.md:3 msgid "" "For this training, we will mostly explore the Rust language through examples " "which can be executed through your browser. This makes the setup much easier " @@ -2299,7 +2345,7 @@ msgstr "" "lucru face configurarea mult mai ușoară și asigură o experiență coerentă " "pentru toată lumea." -#: src/cargo/code-samples.md +#: src/cargo/code-samples.md:7 msgid "" "Installing Cargo is still encouraged: it will make it easier for you to do " "the exercises. On the last day, we will do a larger exercise which shows you " @@ -2309,23 +2355,23 @@ msgstr "" "exercițiile. În ultima zi, vom face un exercițiu mai amplu care vă va arăta " "cum să lucrați cu dependențele și pentru care aveți nevoie de Cargo." -#: src/cargo/code-samples.md +#: src/cargo/code-samples.md:11 msgid "The code blocks in this course are fully interactive:" msgstr "Blocurile de cod din acest curs sunt complet interactive:" -#: src/cargo/code-samples.md src/cargo/running-locally.md +#: src/cargo/code-samples.md:15 src/cargo/running-locally.md:46 msgid "\"Edit me!\"" -msgstr "" +msgstr "\"Editează-mă!\"" -#: src/cargo/code-samples.md +#: src/cargo/code-samples.md:19 msgid "You can use " msgstr "Puteți utiliza " -#: src/cargo/code-samples.md +#: src/cargo/code-samples.md:19 msgid " to execute the code when focus is in the text box." msgstr " pentru a executa codul atunci când focusul se află în caseta de text." -#: src/cargo/code-samples.md +#: src/cargo/code-samples.md:24 msgid "" "Most code samples are editable like shown above. A few code samples are not " "editable for various reasons:" @@ -2333,7 +2379,7 @@ msgstr "" "Majoritatea mostrelor de cod sunt editabile, așa cum se arată mai sus. " "Câteva mostre de cod nu sunt editabile din diverse motive:" -#: src/cargo/code-samples.md +#: src/cargo/code-samples.md:27 msgid "" "The embedded playgrounds cannot execute unit tests. Copy-paste the code and " "open it in the real Playground to demonstrate unit tests." @@ -2342,7 +2388,7 @@ msgstr "" "lipiți codul și deschideți-l în locul de zona de lucru locală pentru a " "demonstra testele unitare." -#: src/cargo/code-samples.md +#: src/cargo/code-samples.md:30 msgid "" "The embedded playgrounds lose their state the moment you navigate away from " "the page! This is the reason that the students should solve the exercises " @@ -2353,11 +2399,11 @@ msgstr "" "rezolve exercițiile folosind o instalare locală de Rust sau prin intermediul " "zonei de încercare." -#: src/cargo/running-locally.md +#: src/cargo/running-locally.md:1 msgid "Running Code Locally with Cargo" msgstr "Rularea codului la nivel local cu Cargo" -#: src/cargo/running-locally.md +#: src/cargo/running-locally.md:3 msgid "" "If you want to experiment with the code on your own system, then you will " "need to first install Rust. Do this by following the [instructions in the " @@ -2371,7 +2417,7 @@ msgstr "" "avea astfel un `rustc` și un `cargo` funcțional. La momentul scrierii " "acestui articol, cea mai recentă versiune stabilă Rust are versiunea:" -#: src/cargo/running-locally.md +#: src/cargo/running-locally.md:16 msgid "" "You can use any later version too since Rust maintains backwards " "compatibility." @@ -2379,7 +2425,7 @@ msgstr "" "Puteți utiliza și orice versiune ulterioară, deoarece Rust păstrează " "compatibilitatea cu versiunile anterioare." -#: src/cargo/running-locally.md +#: src/cargo/running-locally.md:18 msgid "" "With this in place, follow these steps to build a Rust binary from one of " "the examples in this training:" @@ -2387,27 +2433,27 @@ msgstr "" "Ulterior urmați acești pași pentru a construi un binar Rust din unul dintre " "exemplele din acest curs de instruire:" -#: src/cargo/running-locally.md +#: src/cargo/running-locally.md:21 msgid "Click the \"Copy to clipboard\" button on the example you want to copy." msgstr "" "Apăsați pe butonul \"Copy to clipboard\" (Copiere în clipboard) al " "exemplului pe care doriți să îl copiați." -#: src/cargo/running-locally.md +#: src/cargo/running-locally.md:23 msgid "" "Use `cargo new exercise` to create a new `exercise/` directory for your code:" msgstr "" "Utilizați `cargo new exercise` pentru a crea un nou director `exercise/` " "pentru codul dumneavoastră:" -#: src/cargo/running-locally.md +#: src/cargo/running-locally.md:30 msgid "" "Navigate into `exercise/` and use `cargo run` to build and run your binary:" msgstr "" "Navigați în `exercise/` și folosiți `cargo run` pentru a construi și rula " "binarul dumneavoastră:" -#: src/cargo/running-locally.md +#: src/cargo/running-locally.md:41 msgid "" "Replace the boiler-plate code in `src/main.rs` with your own code. For " "example, using the example on the previous page, make `src/main.rs` look like" @@ -2416,11 +2462,11 @@ msgstr "" "folosind exemplul de pe pagina anterioară, faceți`src/main.rs` să arate " "astfel" -#: src/cargo/running-locally.md +#: src/cargo/running-locally.md:50 msgid "Use `cargo run` to build and run your updated binary:" msgstr "Utilizați `cargo run` pentru a construi și rula binarul actualizat:" -#: src/cargo/running-locally.md +#: src/cargo/running-locally.md:60 msgid "" "Use `cargo check` to quickly check your project for errors, use `cargo " "build` to compile it without running it. You will find the output in `target/" @@ -2433,7 +2479,7 @@ msgstr "" "Folosiți `cargo build --release` pentru a produce o compilare optimizată de " "lansare în `target/release/`." -#: src/cargo/running-locally.md +#: src/cargo/running-locally.md:65 msgid "" "You can add dependencies for your project by editing `Cargo.toml`. When you " "run `cargo` commands, it will automatically download and compile missing " @@ -2443,7 +2489,7 @@ msgstr "" "toml`. Când executați comenzile `cargo`, acesta va descărca și compila " "automat dependențele lipsă pentru dumneavoastră." -#: src/cargo/running-locally.md +#: src/cargo/running-locally.md:73 msgid "" "Try to encourage the class participants to install Cargo and use a local " "editor. It will make their life easier since they will have a normal " @@ -2453,11 +2499,11 @@ msgstr "" "utilizeze un editor local. Acest lucru le va face viața mai ușoară, deoarece " "vor avea un mediu de dezvoltare normal." -#: src/welcome-day-1.md +#: src/welcome-day-1.md:1 msgid "Welcome to Day 1" msgstr "Bine ați venit la Ziua 1" -#: src/welcome-day-1.md +#: src/welcome-day-1.md:3 msgid "" "This is the first day of Rust Fundamentals. We will cover a lot of ground " "today:" @@ -2465,7 +2511,7 @@ msgstr "" "Aceasta este prima zi a cursului Rust Fundamentals. Vom acoperi o mulțime de " "subiecte astăzi:" -#: src/welcome-day-1.md +#: src/welcome-day-1.md:5 msgid "" "Basic Rust syntax: variables, scalar and compound types, enums, structs, " "references, functions, and methods." @@ -2473,77 +2519,83 @@ msgstr "" "Sintaxa de bază Rust: variabile, tipuri scalare și compuse, enumerații, " "structuri, referințe, funcții și metode." -#: src/welcome-day-1.md -#, fuzzy +#: src/welcome-day-1.md:7 msgid "Types and type inference." -msgstr "inferența de tip:" +msgstr "Tipuri și inferența de tip." -#: src/welcome-day-1.md +#: src/welcome-day-1.md:8 msgid "Control flow constructs: loops, conditionals, and so on." -msgstr "" +msgstr "Construcții ale fluxului de control: bucle, condiționale și altele." -#: src/welcome-day-1.md +#: src/welcome-day-1.md:9 msgid "User-defined types: structs and enums." -msgstr "" +msgstr "Tipuri definite de utilizator: structurile și enumerațiile." -#: src/welcome-day-1.md +#: src/welcome-day-1.md:10 msgid "Pattern matching: destructuring enums, structs, and arrays." msgstr "" "Găsirea de tipare: destructurarea enumerațiilor, structurilor și a " "tablourilor." -#: src/welcome-day-1.md src/welcome-day-2.md src/welcome-day-3.md -#: src/welcome-day-4.md +#: src/welcome-day-1.md:12 src/welcome-day-2.md:12 src/welcome-day-3.md:9 +#: src/welcome-day-4.md:11 msgid "Schedule" -msgstr "" +msgstr "Program" -#: 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/welcome-day-1.md:14 src/welcome-day-1-afternoon.md:3 +#: src/welcome-day-2.md:14 src/welcome-day-2-afternoon.md:3 +#: src/welcome-day-3.md:11 src/welcome-day-3-afternoon.md:3 +#: src/welcome-day-4.md:13 src/welcome-day-4-afternoon.md:3 msgid "In this session:" -msgstr "" +msgstr "În această sesiune:" -#: src/welcome-day-1.md +#: src/welcome-day-1.md:15 msgid "[Welcome](./welcome-day-1.md) (5 minutes)" -msgstr "" +msgstr "[Introducere](./welcome-day-1.md) (5 minute)" -#: src/welcome-day-1.md -msgid "[Hello, World](./hello-world.md) (20 minutes)" -msgstr "" +#: src/welcome-day-1.md:16 +#, fuzzy +msgid "[Hello, World](./hello-world.md) (15 minutes)" +msgstr "[Hello, World](./hello-world.md) (20 minute)" -#: src/welcome-day-1.md -msgid "[Types and Values](./types-and-values.md) (1 hour and 5 minutes)" -msgstr "" +#: src/welcome-day-1.md:17 +#, fuzzy +msgid "[Types and Values](./types-and-values.md) (40 minutes)" +msgstr "[Tipuri și valori](./types-and-values.md) (1 oră și 5 minute)" -#: src/welcome-day-1.md -msgid "[Control Flow Basics](./control-flow-basics.md) (1 hour)" -msgstr "" +#: src/welcome-day-1.md:18 +#, fuzzy +msgid "[Control Flow Basics](./control-flow-basics.md) (40 minutes)" +msgstr "[Bazele fluxului de control](./control-flow-basics.md) (1 oră)" -#: src/welcome-day-1.md src/welcome-day-2-afternoon.md -msgid "Including 10 minute breaks, this session should take about 3 hours" +#: src/welcome-day-1.md:20 +#, fuzzy +msgid "" +"Including 10 minute breaks, this session should take about 2 hours and 5 " +"minutes" msgstr "" +"Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze " +"aproximativ 2 ore și 55 de minute" -#: src/welcome-day-1.md +#: src/welcome-day-1.md:26 msgid "Please remind the students that:" msgstr "Vă rugăm să le reamintiți cursanților că:" -#: src/welcome-day-1.md +#: src/welcome-day-1.md:28 msgid "" "They should ask questions when they get them, don't save them to the end." msgstr "" "Ar trebui să pună întrebări atunci când le primesc, nu să le lase pentru " "final." -#: src/welcome-day-1.md +#: src/welcome-day-1.md:29 msgid "" "The class is meant to be interactive and discussions are very much " "encouraged!" msgstr "" "Clasa se dorește a fi interactivă, iar discuțiile sunt foarte încurajate!" -#: src/welcome-day-1.md -#, fuzzy +#: src/welcome-day-1.md:30 msgid "" "As an instructor, you should try to keep the discussions relevant, i.e., " "keep the discussions related to how Rust does things vs some other language. " @@ -2552,18 +2604,18 @@ msgid "" msgstr "" "În calitate de instructor, ar trebui să încercați să păstrați discuțiile " "relevante, adică să păstrați discuțiile legate de modul în care Rust face " -"lucrurile în comparație cu un alt limbaj. Poate fi greu să găsiți " -"echilibrul potrivit, dar e de preferat să permiteți discuțiile, deoarece " -"acestea antrenează oamenii mult mai mult decât comunicarea unidirecțională." +"lucrurile în comparație cu un alt limbaj. Poate fi greu să găsiți echilibrul " +"potrivit, dar e de preferat să permiteți discuțiile, deoarece acestea " +"antrenează oamenii mult mai mult decât comunicarea unidirecțională." -#: src/welcome-day-1.md +#: src/welcome-day-1.md:34 msgid "" "The questions will likely mean that we talk about things ahead of the slides." msgstr "" "Întrebările vor însemna probabil că vom vorbi despre lucruri înainte de " "prezentarea slide-urilor." -#: src/welcome-day-1.md +#: src/welcome-day-1.md:35 msgid "" "This is perfectly okay! Repetition is an important part of learning. " "Remember that the slides are just a support and you are free to skip them as " @@ -2573,14 +2625,17 @@ msgstr "" "învățării. Nu uitați că diapozitivele sunt doar un suport și că sunteți " "liberi să le săriți după cum doriți." -#: src/welcome-day-1.md +#: src/welcome-day-1.md:39 msgid "" "The idea for the first day is to show the \"basic\" things in Rust that " "should have immediate parallels in other languages. The more advanced parts " "of Rust come on the subsequent days." msgstr "" +"Ideea pentru prima zi este de a arăta lucrurile \"de bază\" din Rust care ar " +"trebui să aibă paralele imediate cu alte limbaje. Părțile mai avansate din " +"Rust vor fi prezentate în zilele următoare." -#: src/welcome-day-1.md +#: src/welcome-day-1.md:43 msgid "" "If you're teaching this in a classroom, this is a good place to go over the " "schedule. Note that there is an exercise at the end of each segment, " @@ -2588,38 +2643,41 @@ msgid "" "The times listed here are a suggestion in order to keep the course on " "schedule. Feel free to be flexible and adjust as necessary!" msgstr "" - -#: 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/slices-and-lifetimes.md -#: src/iterators.md src/modules.md src/testing.md src/error-handling.md -#: src/unsafe-rust.md +"Dacă predați acest curs în clasă, acesta este un loc bun pentru a trece în " +"revistă programul. Rețineți că există un exercițiu la sfârșitul fiecărui " +"segment, urmat de o pauză. Planificați să acoperiți soluția exercițiului " +"după pauză. Orele listate aici sunt o sugestie pentru a menține cursul în " +"program. Nu ezitați să fiți flexibili și să vă adaptați după cum este " +"necesar!" + +#: src/hello-world.md:3 src/types-and-values.md:3 src/control-flow-basics.md:3 +#: src/tuples-and-arrays.md:3 src/references.md:3 src/user-defined-types.md:3 +#: src/pattern-matching.md:3 src/methods-and-traits.md:3 src/generics.md:3 +#: src/std-types.md:3 src/std-traits.md:3 src/memory-management.md:3 +#: src/smart-pointers.md:3 src/borrowing.md:3 src/lifetimes.md:3 +#: src/iterators.md:3 src/modules.md:3 src/testing.md:3 src/error-handling.md:3 +#: src/unsafe-rust.md:3 msgid "In this segment:" -msgstr "" +msgstr "În acest segment:" -#: src/hello-world.md +#: src/hello-world.md:4 msgid "[What is Rust?](./hello-world/what-is-rust.md) (10 minutes)" -msgstr "" - -#: src/hello-world.md -msgid "[Hello, World](./hello-world/hello-world.md) (5 minutes)" -msgstr "" +msgstr "[Ce este Rust?](./hello-world/what-is-rust.md) (10 minute)" -#: src/hello-world.md +#: src/hello-world.md:5 msgid "[Benefits of Rust](./hello-world/benefits.md) (3 minutes)" -msgstr "" +msgstr "[Avantajele Rust](./hello-world/benefits.md) (3 minute)" -#: src/hello-world.md +#: src/hello-world.md:6 msgid "[Playground](./hello-world/playground.md) (2 minutes)" -msgstr "" +msgstr "[Terenul de joacă](./hello-world/playground.md) (2 minute)" -#: src/hello-world.md -msgid "This segment should take about 20 minutes" -msgstr "" +#: src/hello-world.md:8 +#, fuzzy +msgid "This segment should take about 15 minutes" +msgstr "Acest segment ar trebui să dureze aproximativ 55 de minute" -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:3 msgid "" "Rust is a new programming language which had its [1.0 release in 2015]" "(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):" @@ -2627,15 +2685,15 @@ msgstr "" "Rust este un nou limbaj de programare care a avut [versiunea 1.0 în 2015]" "(https://blog.rust-lang.org/2015/05/15/Rust-1.0.html):" -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:5 msgid "Rust is a statically compiled language in a similar role as C++" msgstr "Rust este un limbaj compilat static, cu un rol similar cu C++" -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:6 msgid "`rustc` uses LLVM as its backend." msgstr "`rustc` folosește LLVM ca backend." -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:7 msgid "" "Rust supports many [platforms and architectures](https://doc.rust-lang.org/" "nightly/rustc/platform-support.html):" @@ -2643,67 +2701,292 @@ msgstr "" "Rust suportă multe [platforme și arhitecturi](https://doc.rust-lang.org/" "nightly/rustc/platform-support.html):" -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:9 msgid "x86, ARM, WebAssembly, ..." msgstr "x86, ARM, WebAssembly, ..." -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:10 msgid "Linux, Mac, Windows, ..." msgstr "Linux, Mac, Windows, ..." -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:11 msgid "Rust is used for a wide range of devices:" msgstr "Rust este utilizat pentru o gamă largă de dispozitive:" -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:12 msgid "firmware and boot loaders," msgstr "firmware și boot leaders," -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:13 msgid "smart displays," msgstr "ecrane inteligente," -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:14 msgid "mobile phones," msgstr "telefoane mobile," -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:15 msgid "desktops," msgstr "desktop-uri," -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:16 msgid "servers." msgstr "servere." -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:21 msgid "Rust fits in the same area as C++:" msgstr "Rust se încadrează în aceeași zonă ca și C++:" -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:23 msgid "High flexibility." msgstr "Flexibilitate ridicată." -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:24 msgid "High level of control." msgstr "Nivel ridicat de control." -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:25 msgid "" "Can be scaled down to very constrained devices such as microcontrollers." msgstr "" "Poate fi redus pentru a rula pe dispozitive foarte limitate, cum ar fi " "microcontrolerele." -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:26 msgid "Has no runtime or garbage collection." msgstr "Nu are nevoie de mediu de execuție și nici de colectare de gunoi." -#: src/hello-world/what-is-rust.md +#: src/hello-world/what-is-rust.md:27 msgid "Focuses on reliability and safety without sacrificing performance." msgstr "" "Se concentrează pe fiabilitate și siguranță fără a sacrifica performanța." -#: src/hello-world/hello-world.md +#: src/hello-world/benefits.md:3 +msgid "Some unique selling points of Rust:" +msgstr "Câteva caracteristici ale Rust:" + +#: src/hello-world/benefits.md:5 +msgid "" +"_Compile time memory safety_ - whole classes of memory bugs are prevented at " +"compile time" +msgstr "" +"_Siguranța memoriei la compilare_ - clase întregi de erori de memorie sunt " +"prevenite la compilare" + +#: src/hello-world/benefits.md:7 +msgid "No uninitialized variables." +msgstr "Nu există variabile neinițializate." + +#: src/hello-world/benefits.md:8 +msgid "No double-frees." +msgstr "Nu există eliberări duble de memorie." + +#: src/hello-world/benefits.md:9 +msgid "No use-after-free." +msgstr "Nu se utilizează după eliberare." + +#: src/hello-world/benefits.md:10 +msgid "No `NULL` pointers." +msgstr "Nu există pointeri `NULL`." + +#: src/hello-world/benefits.md:11 +msgid "No forgotten locked mutexes." +msgstr "Nu s-au uitat mutexuri blocate." + +#: src/hello-world/benefits.md:12 +msgid "No data races between threads." +msgstr "Nu există concurență la date între firele de execuție." + +#: src/hello-world/benefits.md:13 +msgid "No iterator invalidation." +msgstr "Nu sunt invalidări ale iteratorilor." + +#: src/hello-world/benefits.md:15 +msgid "" +"_No undefined runtime behavior_ - what a Rust statement does is never left " +"unspecified" +msgstr "" +"_Fără comportament nedefinit în timp de execuție_ - ceea ce face o " +"declarație Rust nu este niciodată nespecificat" + +#: src/hello-world/benefits.md:17 +msgid "Array access is bounds checked." +msgstr "Accesul la matrice este verificat în funcție de limite." + +#: src/hello-world/benefits.md:18 +msgid "Integer overflow is defined (panic or wrap-around)." +msgstr "Este definită depășirea numărului întreg (panică sau wrap-around)." + +#: src/hello-world/benefits.md:20 +msgid "" +"_Modern language features_ - as expressive and ergonomic as higher-level " +"languages" +msgstr "" +"_Caracteristicile limbajelor moderne_ - la fel de expresive și ergonomice ca " +"și limbajele de nivel superior" + +#: src/hello-world/benefits.md:22 +msgid "Enums and pattern matching." +msgstr "Enums și găsirea de modele." + +#: src/hello-world/benefits.md:23 +msgid "Generics." +msgstr "Tipuri generice." + +#: src/hello-world/benefits.md:24 +msgid "No overhead FFI." +msgstr "FFI fără costuri suplimentare." + +#: src/hello-world/benefits.md:25 +msgid "Zero-cost abstractions." +msgstr "Abstracții fără costuri." + +#: src/hello-world/benefits.md:26 +msgid "Great compiler errors." +msgstr "Erorile de compilare importante." + +#: src/hello-world/benefits.md:27 +msgid "Built-in dependency manager." +msgstr "Manager de dependențe încorporat." + +#: src/hello-world/benefits.md:28 +msgid "Built-in support for testing." +msgstr "Suport pentru testare încorporat." + +#: src/hello-world/benefits.md:29 +msgid "Excellent Language Server Protocol support." +msgstr "Suport excelent pentru protocolul serverului de limbă." + +#: src/hello-world/benefits.md:34 +msgid "" +"Do not spend much time here. All of these points will be covered in more " +"depth later." +msgstr "" +"Nu petreceți mult timp aici. Toate aceste puncte vor fi abordate mai în " +"profunzime mai târziu." + +#: src/hello-world/benefits.md:37 +msgid "" +"Make sure to ask the class which languages they have experience with. " +"Depending on the answer you can highlight different features of Rust:" +msgstr "" +"Nu uitați să întrebați elevii din clasă cu ce limbaje au experiență. În " +"funcție de răspuns, puteți evidenția diferite caracteristici ale Rust:" + +#: src/hello-world/benefits.md:40 +msgid "" +"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ " +"via the borrow checker. You get performance like in C and C++, but you don't " +"have the memory unsafety issues. In addition, you get a modern language with " +"constructs like pattern matching and built-in dependency management." +msgstr "" +"Experiență cu C sau C++: Rust elimină o întreagă clasă de erori de execuție " +"prin intermediul verificatorului de împrumuturi. Obțineți performanțe ca în " +"C și C++, dar nu aveți probleme de nesiguranță a memoriei. În plus, obțineți " +"un limbaj modern, cu construcții precum șabloane de potrivire și gestionarea " +"integrată a dependențelor." + +#: src/hello-world/benefits.md:45 +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 "" +"Experiență cu Java, Go, Python, JavaScript...: Obțineți aceeași siguranță a " +"memoriei ca în aceste limbaje, plus o senzație similară de limbaj de nivel " +"înalt. În plus, obțineți performanțe rapide și previzibile ca în C și C++ " +"(fără colector de memorie), precum și acces la hardware de nivel scăzut " +"(dacă aveți nevoie)" + +#: src/hello-world/playground.md:3 +msgid "" +"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to " +"run short Rust programs, and is the basis for the examples and exercises in " +"this course. Try running the \"hello-world\" program it starts with. It " +"comes with a few handy features:" +msgstr "" +"[Rust Playground](https://play.rust-lang.org/) oferă o modalitate ușoară de " +"a rula programe Rust scurte și reprezintă baza pentru exemplele și " +"exercițiile din acest curs. Încercați să rulați programul \"hello-world\" cu " +"care începe. Acesta vine cu câteva caracteristici utile:" + +#: src/hello-world/playground.md:8 +msgid "" +"Under \"Tools\", use the `rustfmt` option to format your code in the " +"\"standard\" way." +msgstr "" +"În secțiunea \"Tools\", utilizați opțiunea `rustfmt` pentru a formata codul " +"în mod \"standard\"." + +#: src/hello-world/playground.md:11 +msgid "" +"Rust has two main \"profiles\" for generating code: Debug (extra runtime " +"checks, less optimization) and Release (fewer runtime checks, lots of " +"optimization). These are accessible under \"Debug\" at the top." +msgstr "" +"Rust are două \"profiluri\" principale pentru generarea de cod: Debug " +"(verificări suplimentare în timpul execuției, mai puțină optimizare) și " +"Release (mai puține verificări în timpul execuției, multă optimizare). " +"Acestea sunt accesibile sub \"Debug\" în partea de sus." + +#: src/hello-world/playground.md:15 +msgid "" +"If you're interested, use \"ASM\" under \"...\" to see the generated " +"assembly code." +msgstr "" +"Dacă sunteți interesați, utilizați \"ASM\" sub \"...\" pentru a vedea codul " +"de asamblare generat." + +#: src/hello-world/playground.md:21 +msgid "" +"As students head into the break, encourage them to open up the playground " +"and experiment a little. Encourage them to keep the tab open and try things " +"out during the rest of the course. This is particularly helpful for advanced " +"students who want to know more about Rust's optimizations or generated " +"assembly." +msgstr "" +"Încurajați cursanții să experimenteze în mediul de lucru virtual pe " +"parcursul restului cursului. Acest lucru este deosebit de util pentru " +"studenții avansați care doresc să afle mai multe despre optimizările Rust " +"sau despre codul în limbaj de asamblare generat." + +#: src/types-and-values.md:4 +#, fuzzy +msgid "[Hello, World](./types-and-values/hello-world.md) (5 minutes)" +msgstr "[Hello, World](./hello-world/hello-world.md) (5 minute)" + +#: src/types-and-values.md:5 +msgid "[Variables](./types-and-values/variables.md) (5 minutes)" +msgstr "[Variabile](./types-and-values/variables.md) (5 minute)" + +#: src/types-and-values.md:6 +#, fuzzy +msgid "[Values](./types-and-values/values.md) (5 minutes)" +msgstr "[Valori](./types-and-values/values.md) (10 minute)" + +#: src/types-and-values.md:7 +#, fuzzy +msgid "[Arithmetic](./types-and-values/arithmetic.md) (3 minutes)" +msgstr "[Aritmetică](./types-and-values/arithmetic.md) (5 minute)" + +#: src/types-and-values.md:8 +#, fuzzy +msgid "[Type Inference](./types-and-values/inference.md) (3 minutes)" +msgstr "[Inferență de tip](./types-and-values/inference.md) (5 minute)" + +#: src/types-and-values.md:9 +#, fuzzy +msgid "[Exercise: Fibonacci](./types-and-values/exercise.md) (15 minutes)" +msgstr "[Exercițiu: Fibonacci](./types-and-values/exercise.md) (30 minute)" + +#: src/types-and-values.md:11 src/control-flow-basics.md:12 src/generics.md:10 +#: src/modules.md:10 +#, fuzzy +msgid "This segment should take about 40 minutes" +msgstr "Acest segment ar trebui să dureze aproximativ 40 de minute" + +#: src/types-and-values/hello-world.md:3 msgid "" "Let us jump into the simplest possible Rust program, a classic Hello World " "program:" @@ -2711,48 +2994,47 @@ msgstr "" "Să trecem la cel mai simplu program Rust posibil, un program clasic Bună " "Lume:" -#: src/hello-world/hello-world.md +#: src/types-and-values/hello-world.md:8 msgid "\"Hello 🌍!\"" -msgstr "" +msgstr "\"Bună ziua 🌍!\"" -#: src/hello-world/hello-world.md +#: src/types-and-values/hello-world.md:12 msgid "What you see:" msgstr "Ce vedeți:" -#: src/hello-world/hello-world.md +#: src/types-and-values/hello-world.md:14 msgid "Functions are introduced with `fn`." msgstr "Funcțiile sunt introduse cu `fn`." -#: src/hello-world/hello-world.md +#: src/types-and-values/hello-world.md:15 msgid "Blocks are delimited by curly braces like in C and C++." msgstr "Blocurile sunt delimitate prin paranteze curbe, ca în C și C++." -#: src/hello-world/hello-world.md +#: src/types-and-values/hello-world.md:16 msgid "The `main` function is the entry point of the program." msgstr "Funcția `main` este punctul de intrare al programului." -#: src/hello-world/hello-world.md +#: src/types-and-values/hello-world.md:17 msgid "Rust has hygienic macros, `println!` is an example of this." msgstr "Rust are macro-uri igienice, `println!` este un exemplu în acest sens." -#: src/hello-world/hello-world.md +#: src/types-and-values/hello-world.md:18 msgid "Rust strings are UTF-8 encoded and can contain any Unicode character." msgstr "" "Șirurile de caractere Rust sunt codificate UTF-8 și pot conține orice " "caracter Unicode." -#: src/hello-world/hello-world.md -#, fuzzy +#: src/types-and-values/hello-world.md:23 msgid "" "This slide tries to make the students comfortable with Rust code. They will " "see a ton of it over the next four days so we start small with something " "familiar." msgstr "" -"Acest diapozitiv încearcă să îi facă pe cursanți să se simtă confortabil cu " +"Această pagină încearcă să îi facă pe cursanți să se simtă confortabil cu " "codul Rust. Ei vor vedea o mulțime de astfel de fișiere în următoarele trei " "zile, așa că vom începe cu ceva familiar." -#: src/hello-world/hello-world.md +#: src/types-and-values/hello-world.md:28 msgid "" "Rust is very much like other languages in the C/C++/Java tradition. It is " "imperative and it doesn't try to reinvent things unless absolutely necessary." @@ -2761,12 +3043,11 @@ msgstr "" "imperativ și nu încearcă să reinventeze lucrurile decât dacă este absolut " "necesar." -#: src/hello-world/hello-world.md +#: src/types-and-values/hello-world.md:31 msgid "Rust is modern with full support for things like Unicode." msgstr "Rust este modern, cu suport complet pentru lucruri precum Unicode." -#: src/hello-world/hello-world.md -#, fuzzy +#: src/types-and-values/hello-world.md:33 msgid "" "Rust uses macros for situations where you want to have a variable number of " "arguments (no function [overloading](../control-flow-basics/functions.md))." @@ -2775,7 +3056,7 @@ msgstr "" "număr variabil de argumente (fără [supraîncărcare](basic-syntax/functions-" "interlude.md) de funcții )." -#: src/hello-world/hello-world.md +#: src/types-and-values/hello-world.md:36 msgid "" "Macros being 'hygienic' means they don't accidentally capture identifiers " "from the scope they are used in. Rust macros are actually only [partially " @@ -2787,7 +3068,7 @@ msgstr "" "Rust sunt de fapt doar [parțial igienice](https://veykril.github.io/tlborm/" "decl-macros/minutiae/hygiene.html)." -#: src/hello-world/hello-world.md +#: src/types-and-values/hello-world.md:40 msgid "" "Rust is multi-paradigm. For example, it has powerful [object-oriented " "programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, " @@ -2800,206 +3081,7 @@ msgstr "" "funcționale](https://doc.rust-lang.org/book/ch13-00-functional-features." "html)." -#: src/hello-world/benefits.md -msgid "Some unique selling points of Rust:" -msgstr "Câteva caracteristici ale Rust:" - -#: src/hello-world/benefits.md -msgid "" -"_Compile time memory safety_ - whole classes of memory bugs are prevented at " -"compile time" -msgstr "" - -#: src/hello-world/benefits.md -msgid "No uninitialized variables." -msgstr "Nu există variabile neinițializate." - -#: src/hello-world/benefits.md -msgid "No double-frees." -msgstr "Nu există eliberări duble de memorie." - -#: src/hello-world/benefits.md -msgid "No use-after-free." -msgstr "Nu se utilizează după eliberare." - -#: src/hello-world/benefits.md -msgid "No `NULL` pointers." -msgstr "Nu există pointeri `NULL`." - -#: src/hello-world/benefits.md -msgid "No forgotten locked mutexes." -msgstr "Nu s-au uitat mutexuri blocate." - -#: src/hello-world/benefits.md -msgid "No data races between threads." -msgstr "Nu există concurență la date între firele de execuție." - -#: src/hello-world/benefits.md -msgid "No iterator invalidation." -msgstr "Nu sunt invalidări ale iteratorilor." - -#: src/hello-world/benefits.md -msgid "" -"_No undefined runtime behavior_ - what a Rust statement does is never left " -"unspecified" -msgstr "" - -#: src/hello-world/benefits.md -msgid "Array access is bounds checked." -msgstr "Accesul la matrice este verificat în funcție de limite." - -#: src/hello-world/benefits.md -#, fuzzy -msgid "Integer overflow is defined (panic or wrap-around)." -msgstr "Este definită depășirea numărului întreg (panică sau wrap-around)." - -#: src/hello-world/benefits.md -msgid "" -"_Modern language features_ - as expressive and ergonomic as higher-level " -"languages" -msgstr "" - -#: src/hello-world/benefits.md -msgid "Enums and pattern matching." -msgstr "Enums și găsirea de modele." - -#: src/hello-world/benefits.md -#, fuzzy -msgid "Generics." -msgstr "Generice." - -#: src/hello-world/benefits.md -#, fuzzy -msgid "No overhead FFI." -msgstr "Fără costuri suplimentare FFI." - -#: src/hello-world/benefits.md -msgid "Zero-cost abstractions." -msgstr "Abstracții fără costuri." - -#: src/hello-world/benefits.md -msgid "Great compiler errors." -msgstr "Erorile de compilare importante." - -#: src/hello-world/benefits.md -msgid "Built-in dependency manager." -msgstr "Manager de dependențe încorporat." - -#: src/hello-world/benefits.md -msgid "Built-in support for testing." -msgstr "Suport pentru testare încorporat." - -#: src/hello-world/benefits.md -#, fuzzy -msgid "Excellent Language Server Protocol support." -msgstr "Suport excelent pentru protocolul serverului de limbă." - -#: src/hello-world/benefits.md -msgid "" -"Do not spend much time here. All of these points will be covered in more " -"depth later." -msgstr "" - -#: src/hello-world/benefits.md -msgid "" -"Make sure to ask the class which languages they have experience with. " -"Depending on the answer you can highlight different features of Rust:" -msgstr "" -"Nu uitați să întrebați elevii din clasă cu ce limbaje au experiență. În " -"funcție de răspuns, puteți evidenția diferite caracteristici ale Rust:" - -#: src/hello-world/benefits.md -msgid "" -"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ " -"via the borrow checker. You get performance like in C and C++, but you don't " -"have the memory unsafety issues. In addition, you get a modern language with " -"constructs like pattern matching and built-in dependency management." -msgstr "" -"Experiență cu C sau C++: Rust elimină o întreagă clasă de erori de execuție " -"prin intermediul verificatorului de împrumuturi. Obțineți performanțe ca în " -"C și C++, dar nu aveți probleme de nesiguranță a memoriei. În plus, obțineți " -"un limbaj modern, cu construcții precum șabloane de potrivire și gestionarea " -"integrată a dependențelor." - -#: src/hello-world/benefits.md -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 "" -"Experiență cu Java, Go, Python, JavaScript...: Obțineți aceeași siguranță a " -"memoriei ca în aceste limbaje, plus o senzație similară de limbaj de nivel " -"înalt. În plus, obțineți performanțe rapide și previzibile ca în C și C++ " -"(fără colector de memorie), precum și acces la hardware de nivel scăzut " -"(dacă aveți nevoie)" - -#: src/hello-world/playground.md -msgid "" -"The [Rust Playground](https://play.rust-lang.org/) provides an easy way to " -"run short Rust programs, and is the basis for the examples and exercises in " -"this course. Try running the \"hello-world\" program it starts with. It " -"comes with a few handy features:" -msgstr "" - -#: src/hello-world/playground.md -msgid "" -"Under \"Tools\", use the `rustfmt` option to format your code in the " -"\"standard\" way." -msgstr "" - -#: src/hello-world/playground.md -msgid "" -"Rust has two main \"profiles\" for generating code: Debug (extra runtime " -"checks, less optimization) and Release (fewer runtime checks, lots of " -"optimization). These are accessible under \"Debug\" at the top." -msgstr "" - -#: src/hello-world/playground.md -msgid "" -"If you're interested, use \"ASM\" under \"...\" to see the generated " -"assembly code." -msgstr "" - -#: src/hello-world/playground.md -msgid "" -"As students head into the break, encourage them to open up the playground " -"and experiment a little. Encourage them to keep the tab open and try things " -"out during the rest of the course. This is particularly helpful for advanced " -"students who want to know more about Rust's optimizations or generated " -"assembly." -msgstr "" - -#: src/types-and-values.md -msgid "[Variables](./types-and-values/variables.md) (5 minutes)" -msgstr "" - -#: src/types-and-values.md -msgid "[Values](./types-and-values/values.md) (10 minutes)" -msgstr "" - -#: src/types-and-values.md -msgid "[Arithmetic](./types-and-values/arithmetic.md) (5 minutes)" -msgstr "" - -#: src/types-and-values.md -msgid "[Strings](./types-and-values/strings.md) (10 minutes)" -msgstr "" - -#: src/types-and-values.md -msgid "[Type Inference](./types-and-values/inference.md) (5 minutes)" -msgstr "" - -#: src/types-and-values.md -msgid "[Exercise: Fibonacci](./types-and-values/exercise.md) (30 minutes)" -msgstr "" - -#: src/types-and-values.md src/testing.md src/unsafe-rust.md -msgid "This segment should take about 1 hour and 5 minutes" -msgstr "" - -#: src/types-and-values/variables.md -#, fuzzy +#: src/types-and-values/variables.md:3 msgid "" "Rust provides type safety via static typing. Variable bindings are made with " "`let`:" @@ -3007,166 +3089,181 @@ msgstr "" "Rust oferă siguranță de tip prin intermediul tipizării statice. Legăturile " "variabilelor sunt imuabile în mod implicit:" -#: src/types-and-values/variables.md src/control-flow-basics/loops.md -#: src/control-flow-basics/break-continue.md -#: src/control-flow-basics/blocks-and-scopes.md +#: src/types-and-values/variables.md:9 src/control-flow-basics/loops/for.md:9 +#: src/control-flow-basics/blocks-and-scopes.md:17 msgid "\"x: {x}\"" -msgstr "" +msgstr "\"x: {x}\"" -#: src/types-and-values/variables.md +#: src/types-and-values/variables.md:10 msgid "" "// x = 20;\n" " // println!(\"x: {x}\");\n" msgstr "" +"// x = 20;\n" +" // println!(\"x: {x}\");\n" -#: src/types-and-values/variables.md +#: src/types-and-values/variables.md:18 msgid "" "Uncomment the `x = 20` to demonstrate that variables are immutable by " "default. Add the `mut` keyword to allow changes." msgstr "" +"Scoateți comentariul `x = 20` pentru a demonstra că variabilele sunt " +"imuabile în mod implicit. Adăugați cuvântul cheie `mut` pentru a permite " +"modificări." -#: src/types-and-values/variables.md +#: src/types-and-values/variables.md:21 msgid "" "The `i32` here is the type of the variable. This must be known at compile " "time, but type inference (covered later) allows the programmer to omit it in " "many cases." msgstr "" +"Aici `i32` este tipul variabilei. Acesta trebuie să fie cunoscut la " +"compilare, dar inferența de tip (abordată mai târziu) permite " +"programatorului să o omită în multe cazuri." -#: src/types-and-values/values.md +#: src/types-and-values/values.md:3 msgid "" "Here are some basic built-in types, and the syntax for literal values of " "each type." msgstr "" +"Iată câteva tipuri de bază încorporate și sintaxa pentru valorile literale " +"ale fiecărui tip." -#: src/types-and-values/values.md src/tuples-and-arrays/tuples-and-arrays.md -#: src/unsafe-rust/exercise.md +#: src/types-and-values/values.md:6 src/unsafe-rust/exercise.md:16 msgid "Types" msgstr "Tipuri" -#: src/types-and-values/values.md src/tuples-and-arrays/tuples-and-arrays.md -#, fuzzy +#: src/types-and-values/values.md:6 msgid "Literals" msgstr "Literale" -#: src/types-and-values/values.md +#: src/types-and-values/values.md:8 msgid "Signed integers" msgstr "Numere întregi cu semn" -#: src/types-and-values/values.md +#: src/types-and-values/values.md:8 msgid "`i8`, `i16`, `i32`, `i64`, `i128`, `isize`" msgstr "`i8`, `i16`, `i32`, `i64`, `i128`, `isize`" -#: src/types-and-values/values.md +#: src/types-and-values/values.md:8 msgid "`-10`, `0`, `1_000`, `123_i64`" msgstr "`-10`, `0`, `1_000`, `123_i64`" -#: src/types-and-values/values.md +#: src/types-and-values/values.md:9 msgid "Unsigned integers" msgstr "Întregi fără semn" -#: src/types-and-values/values.md +#: src/types-and-values/values.md:9 msgid "`u8`, `u16`, `u32`, `u64`, `u128`, `usize`" msgstr "`u8`, `u16`, `u32`, `u64`, `u128`, `usize`" -#: src/types-and-values/values.md +#: src/types-and-values/values.md:9 msgid "`0`, `123`, `10_u16`" msgstr "`0`, `123`, `10_u16`" -#: src/types-and-values/values.md +#: src/types-and-values/values.md:10 msgid "Floating point numbers" msgstr "Numere în virgulă mobilă" -#: src/types-and-values/values.md +#: src/types-and-values/values.md:10 msgid "`f32`, `f64`" msgstr "`f32`, `f64`" -#: src/types-and-values/values.md +#: src/types-and-values/values.md:10 msgid "`3.14`, `-10.0e20`, `2_f32`" msgstr "`3.14`, `-10.0e20`, `2_f32`" -#: src/types-and-values/values.md +#: src/types-and-values/values.md:11 msgid "Unicode scalar values" msgstr "Valori scalare Unicode" -#: src/types-and-values/values.md +#: src/types-and-values/values.md:11 src/android/aidl/types/primitives.md:9 msgid "`char`" msgstr "`char`" -#: src/types-and-values/values.md +#: src/types-and-values/values.md:11 msgid "`'a'`, `'α'`, `'∞'`" msgstr "`'a'`, `'α'`, `'∞'`" -#: src/types-and-values/values.md -#, fuzzy +#: src/types-and-values/values.md:12 msgid "Booleans" msgstr "Booleeni" -#: src/types-and-values/values.md +#: src/types-and-values/values.md:12 src/android/aidl/types/primitives.md:7 msgid "`bool`" msgstr "`bool`" -#: src/types-and-values/values.md +#: src/types-and-values/values.md:12 msgid "`true`, `false`" msgstr "`true`, `false`" -#: src/types-and-values/values.md +#: src/types-and-values/values.md:14 msgid "The types have widths as follows:" msgstr "Tipurile au lungimi după cum urmează:" -#: src/types-and-values/values.md +#: src/types-and-values/values.md:16 msgid "`iN`, `uN`, and `fN` are _N_ bits wide," msgstr "`iN`, `uN`, și `fN` au o lungime de _N_ biți," -#: src/types-and-values/values.md +#: src/types-and-values/values.md:17 msgid "`isize` and `usize` are the width of a pointer," msgstr "`isize` și `usize` reprezintă lungimea unui pointer," -#: src/types-and-values/values.md +#: src/types-and-values/values.md:18 msgid "`char` is 32 bits wide," msgstr "`char` are o lungime de 32 de biți," -#: src/types-and-values/values.md +#: src/types-and-values/values.md:19 msgid "`bool` is 8 bits wide." msgstr "`bool` are o lungime de 8 biți." -#: src/types-and-values/values.md +#: src/types-and-values/values.md:24 msgid "There are a few syntaxes which are not shown above:" msgstr "Există câteva elemente de sintaxă care nu sunt prezentate mai sus:" -#: src/types-and-values/values.md -#, fuzzy +#: src/types-and-values/values.md:26 msgid "" "All underscores in numbers can be left out, they are for legibility only. So " "`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written " "as `123i64`." msgstr "" -"Toate sublinierile din numere pot fi omise, ele sunt doar pentru " +"Toate sublinierile din numere pot fi omise, ele sunt folosite doar pentru " "lizibilitate. Astfel, `1_000` poate fi scris ca `1000` (sau `10_00`), iar " "`123_i64` poate fi scris ca `123i64`." -#: src/types-and-values/arithmetic.md +#: src/types-and-values/arithmetic.md:9 msgid "\"result: {}\"" -msgstr "" +msgstr "“result: {}”" -#: src/types-and-values/arithmetic.md +#: src/types-and-values/arithmetic.md:16 msgid "" "This is the first time we've seen a function other than `main`, but the " "meaning should be clear: it takes three integers, and returns an integer. " "Functions will be covered in more detail later." msgstr "" +"Aceasta este prima dată când vedem o altă funcție decât `main`, dar " +"semnificația ar trebui să fie clară: primește trei numere întregi și " +"returnează un număr întreg. Funcțiile vor fi tratate mai în detaliu mai " +"târziu." -#: src/types-and-values/arithmetic.md +#: src/types-and-values/arithmetic.md:20 msgid "Arithmetic is very similar to other languages, with similar precedence." msgstr "" +"Aritmetica este foarte asemănătoare cu cea din alte limbaje, cu precedență " +"similară." -#: src/types-and-values/arithmetic.md +#: src/types-and-values/arithmetic.md:22 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." msgstr "" +"Cum rămâne cu depășirea de numere întregi? În C și C++, depășirea numărului " +"de numere întregi cu semn este, de fapt, nedefinită și poate avea efecte " +"diferite pe diferite platforme sau compilatoare. În Rust, este definită." -#: src/types-and-values/arithmetic.md +#: src/types-and-values/arithmetic.md:26 +#, fuzzy msgid "" "Change the `i32`'s to `i16` to see an integer overflow, which panics " "(checked) in a debug build and wraps in a release build. There are other " @@ -3174,112 +3271,36 @@ msgid "" "with method syntax, e.g., `(a * b).saturating_add(b * c).saturating_add(c * " "a)`." msgstr "" +"Schimbați `i32` în `i16` pentru a vedea o depășire de număr întreg, care " +"intră în panică (verificată) într-o compilare de depanare și care se " +"înfășoară într-o compilare de release. Există și alte opțiuni, cum ar fi " +"depășirea, saturarea și reținerea depășirii. Acestea sunt accesate cu " +"sintaxa metodei, de exemplu, `(a * b).saturating_add(b * c).saturating_add(c " +"* a)`." -#: src/types-and-values/arithmetic.md +#: src/types-and-values/arithmetic.md:31 msgid "" "In fact, the compiler will detect overflow of constant expressions, which is " "why the example requires a separate function." msgstr "" +"De fapt, compilatorul va detecta depășirea expresiilor constante, motiv " +"pentru care exemplul necesită o funcție separată." -#: src/types-and-values/strings.md -msgid "" -"Rust has two types to represent strings, both of which will be covered in " -"more depth later. Both _always_ store UTF-8 encoded strings." -msgstr "" - -#: src/types-and-values/strings.md -#, fuzzy -msgid "`String` - a modifiable, owned string." -msgstr "`String` un buffer de șir de caractere mutabil." - -#: src/types-and-values/strings.md -msgid "`&str` - a read-only string. String literals have this type." -msgstr "" - -#: src/types-and-values/strings.md -msgid "\"Greetings\"" -msgstr "" - -#: src/types-and-values/strings.md -msgid "\"🪐\"" -msgstr "" - -#: src/types-and-values/strings.md -msgid "\", \"" -msgstr "" - -#: src/types-and-values/strings.md -msgid "\"final sentence: {}\"" -msgstr "" - -#: src/types-and-values/strings.md src/async/control-flow/join.md -msgid "\"{:?}\"" -msgstr "" - -#: src/types-and-values/strings.md -msgid "//println!(\"{:?}\", &sentence[12..13]);\n" -msgstr "" - -#: src/types-and-values/strings.md -msgid "" -"This slide introduces strings. Everything here will be covered in more depth " -"later, but this is enough for subsequent slides and exercises to use strings." -msgstr "" - -#: src/types-and-values/strings.md -msgid "Invalid UTF-8 in a string is UB, and this not allowed in safe Rust." -msgstr "" - -#: src/types-and-values/strings.md -msgid "" -"`String` is a user-defined type with a constructor (`::new()`) and methods " -"like `s.push_str(..)`." -msgstr "" - -#: src/types-and-values/strings.md -msgid "" -"The `&` in `&str` indicates that this is a reference. We will cover " -"references later, so for now just think of `&str` as a unit meaning \"a read-" -"only string\"." -msgstr "" - -#: src/types-and-values/strings.md -msgid "" -"The commented-out line is indexing into the string by byte position. " -"`12..13` does not end on a character boundary, so the program panics. Adjust " -"it to a range that does, based on the error message." -msgstr "" - -#: src/types-and-values/strings.md -#, fuzzy -msgid "" -"Raw strings allow you to create a `&str` value with escapes disabled: " -"`r\"\\n\" == \"\\\\n\"`. You can embed double-quotes by using an equal " -"amount of `#` on either side of the quotes:" -msgstr "" -"Șirurile brute de caractere vă permit să creați o valoare `&str` cu " -"scăpările dezactivate: `r\"\\n\" == \"\\n\"`. Puteți încorpora ghilimele " -"duble folosind o cantitate egală de `#` de o parte și de alta a ghilimelelor:" - -#: src/types-and-values/inference.md -#, fuzzy +#: src/types-and-values/inference.md:3 msgid "Rust will look at how the variable is _used_ to determine the type:" msgstr "" "Rust se va uita la modul în care variabila este _utilizată_ pentru a " "determina tipul:" -#: src/types-and-values/inference.md -#, fuzzy +#: src/types-and-values/inference.md:29 msgid "" "This slide demonstrates how the Rust compiler infers types based on " "constraints given by variable declarations and usages." msgstr "" -"Acest diapozitiv demonstrează modul în care compilatorul Rust deduce " -"tipurile pe baza constrângerilor date de declarațiile și utilizările " -"variabilelor." +"Această pagină demonstrează modul în care compilatorul Rust deduce tipurile " +"pe baza constrângerilor date de declarațiile și utilizările variabilelor." -#: src/types-and-values/inference.md -#, fuzzy +#: src/types-and-values/inference.md:32 msgid "" "It is very important to emphasize that variables declared like this are not " "of some sort of dynamic \"any type\" that can hold any data. The machine " @@ -3288,142 +3309,132 @@ msgid "" "code." msgstr "" "Este foarte important să subliniem că variabilele declarate astfel nu sunt " -"de un fel de \"orice tip\" dinamic care poate conține orice date. Codul " -"mașină generat de o astfel de declarație este identic cu declarația " -"explicită a unui tip. Compilatorul își face treaba în locul nostru și ne " -"ajută să scriem un cod mai concis." +"de un fel de \"tip dinamic” care poate conține orice date. Codul mașină " +"generat de o astfel de declarație este identic cu declarația explicită a " +"unui tip. Compilatorul face treaba în locul nostru și ne ajută să scriem un " +"cod mai concis." -#: src/types-and-values/inference.md +#: src/types-and-values/inference.md:37 msgid "" "When nothing constrains the type of an integer literal, Rust defaults to " "`i32`. This sometimes appears as `{integer}` in error messages. Similarly, " "floating-point literals default to `f64`." msgstr "" +"Atunci când nu există constrângeri pentru tipul unui literal de număr " +"întreg, Rust folosește în mod implicit `i32`. Acest lucru apare uneori ca " +"`{integer}` în mesajele de eroare. În mod similar, literalii în virgulă " +"mobilă sunt în mod implicit `f64`." -#: src/types-and-values/inference.md +#: src/types-and-values/inference.md:46 msgid "// ERROR: no implementation for `{float} == {integer}`\n" -msgstr "" +msgstr "// EROARE: nicio implementare pentru `{float} == {integer}`\n" -#: src/types-and-values/exercise.md +#: src/types-and-values/exercise.md:3 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." msgstr "" +"Primul și al doilea număr Fibonacci sunt ambele `1`. Pentru n>2, cel de-al n-" +"lea număr Fibonacci se calculează recursiv ca sumă a celor două numere " +"anterioare." -#: src/types-and-values/exercise.md +#: src/types-and-values/exercise.md:7 msgid "" "Write a function `fib(n)` that calculates the n'th Fibonacci number. When " "will this function panic?" msgstr "" +"Scrieți o funcție `fib(n)` care să calculeze al n-lea număr Fibonacci. Când " +"va intra în panică această funcție?" -#: src/types-and-values/exercise.md +#: src/types-and-values/exercise.md:13 msgid "// The base case.\n" -msgstr "" +msgstr "// Cazul de bază.\n" -#: src/types-and-values/exercise.md src/control-flow-basics/exercise.md -#, fuzzy +#: src/types-and-values/exercise.md:14 src/types-and-values/exercise.md:17 +#: src/control-flow-basics/exercise.md:27 +#: src/control-flow-basics/exercise.md:31 msgid "\"Implement this\"" -msgstr "Implementare" +msgstr "" +"Încercați să rezolvați mai întâi problema în mod \"simplu\", folosind " +"buclele `for` și numere întregi. Apoi, revedeți soluția și încercați să o " +"implementați cu iteratori." -#: src/types-and-values/exercise.md +#: src/types-and-values/exercise.md:16 msgid "// The recursive case.\n" -msgstr "" +msgstr "// Cazul recursiv.\n" -#: src/types-and-values/exercise.md src/types-and-values/solution.md -msgid "\"fib(n) = {}\"" -msgstr "" +#: src/types-and-values/exercise.md:23 src/types-and-values/solution.md:14 +#, fuzzy +msgid "\"fib({n}) = {}\"" +msgstr "\"fib(n) = {}\"" -#: src/control-flow-basics.md -msgid "[Conditionals](./control-flow-basics/conditionals.md) (5 minutes)" -msgstr "" +#: src/control-flow-basics.md:4 +#, fuzzy +msgid "[if Expressions](./control-flow-basics/if.md) (4 minutes)" +msgstr "[Macrouri](./control-flow-basics/macros.md) (2 minute)" -#: src/control-flow-basics.md +#: src/control-flow-basics.md:5 msgid "[Loops](./control-flow-basics/loops.md) (5 minutes)" -msgstr "" +msgstr "[Bucle](./control-flow-basics/loops.md) (5 minute)" -#: src/control-flow-basics.md +#: src/control-flow-basics.md:6 +#, fuzzy msgid "" -"[break and continue](./control-flow-basics/break-continue.md) (5 minutes)" +"[break and continue](./control-flow-basics/break-continue.md) (4 minutes)" msgstr "" +"[`break` și `continue`](./control-flow-basics/break-continue.md) (5 minute)" -#: src/control-flow-basics.md +#: src/control-flow-basics.md:7 +#, fuzzy msgid "" -"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (10 minutes)" +"[Blocks and Scopes](./control-flow-basics/blocks-and-scopes.md) (5 minutes)" msgstr "" +"[Blocuri și domenii de aplicare](./control-flow-basics/blocks-and-scopes.md) " +"(10 minute)" -#: src/control-flow-basics.md +#: src/control-flow-basics.md:8 msgid "[Functions](./control-flow-basics/functions.md) (3 minutes)" -msgstr "" +msgstr "[Funcții](./control-flow-basics/functions.md) (3 minute)" -#: src/control-flow-basics.md +#: src/control-flow-basics.md:9 msgid "[Macros](./control-flow-basics/macros.md) (2 minutes)" -msgstr "" - -#: src/control-flow-basics.md -msgid "" -"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (30 minutes)" -msgstr "" - -#: src/control-flow-basics.md src/tuples-and-arrays.md src/borrowing.md -msgid "This segment should take about 1 hour" -msgstr "" +msgstr "[Macrouri](./control-flow-basics/macros.md) (2 minute)" -#: src/control-flow-basics/conditionals.md -msgid "Much of the Rust syntax will be familiar to you from C, C++ or Java:" -msgstr "Mare parte din sintaxa Rust vă va fi familiară din C, C++ sau Java:" - -#: src/control-flow-basics/conditionals.md +#: src/control-flow-basics.md:10 #, fuzzy -msgid "Blocks are delimited by curly braces." -msgstr "" -"Blocurile și domeniile de aplicare sunt delimitate prin paranteze curbe." - -#: src/control-flow-basics/conditionals.md msgid "" -"Line comments are started with `//`, block comments are delimited by `/* ... " -"*/`." -msgstr "" -"Comentariile de o linie încep cu `//`, iar blocurile de comentarii sunt " -"delimitate de `/* ... */`." - -#: src/control-flow-basics/conditionals.md -msgid "Keywords like `if` and `while` work the same." -msgstr "Cuvinte cheie precum `if` și `while` funcționează la fel." - -#: src/control-flow-basics/conditionals.md -msgid "Variable assignment is done with `=`, comparison is done with `==`." +"[Exercise: Collatz Sequence](./control-flow-basics/exercise.md) (15 minutes)" msgstr "" -"Atribuirea variabilelor se face cu `=`, iar compararea se face cu `==`." +"[Exercițiu: Secvența Collatz](./control-flow-basics/exercițiu.md) (30 minute)" -#: src/control-flow-basics/conditionals.md -#, fuzzy +#: src/control-flow-basics/if.md:1 msgid "`if` expressions" -msgstr "expresii for" +msgstr "Expresii ‘if’" -#: src/control-flow-basics/conditionals.md -#, fuzzy +#: src/control-flow-basics/if.md:3 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 "" -"Utilizați [expresii `if`](https://doc.rust-lang.org/reference/expressions/if-" -"expr.html#if-expressions) exact ca și instrucțiunile `if` din alte limbaje:" +"[Expresiile `if`](https://doc.rust-lang.org/reference/expressions/if-expr." +"html#if-expressions) se utilizează exact ca și instrucțiunile `if` din alte " +"limbaje:" -#: src/control-flow-basics/conditionals.md -msgid "\"small\"" +#: src/control-flow-basics/if.md:11 +msgid "\"zero!\"" msgstr "" -#: src/control-flow-basics/conditionals.md +#: src/control-flow-basics/if.md:13 +#, fuzzy msgid "\"biggish\"" -msgstr "" +msgstr "“măricel”" -#: src/control-flow-basics/conditionals.md +#: src/control-flow-basics/if.md:15 msgid "\"huge\"" -msgstr "" +msgstr "\"imens\"" -#: src/control-flow-basics/conditionals.md -#, fuzzy +#: src/control-flow-basics/if.md:20 msgid "" "In addition, you can use `if` as an expression. The last expression of each " "block becomes the value of the `if` expression:" @@ -3431,16 +3442,19 @@ msgstr "" "În plus, puteți utiliza `if` ca expresie. Ultima expresie din fiecare bloc " "devine valoarea expresiei `if`:" -#: src/control-flow-basics/conditionals.md +#: src/control-flow-basics/if.md:26 +msgid "\"small\"" +msgstr "\"mic\"" + +#: src/control-flow-basics/if.md:26 msgid "\"large\"" -msgstr "" +msgstr "“mare”" -#: src/control-flow-basics/conditionals.md +#: src/control-flow-basics/if.md:27 msgid "\"number size: {}\"" -msgstr "" +msgstr "\"dimensiunea numărului: {}\"" -#: src/control-flow-basics/conditionals.md -#, fuzzy +#: src/control-flow-basics/if.md:34 msgid "" "Because `if` is an expression and must have a particular type, both of its " "branch blocks must have the same type. Show what happens if you add `;` " @@ -3450,24 +3464,26 @@ msgstr "" "blocuri de ramificare trebuie să aibă același tip. Să vedem ce se întâmplă " "dacă adăugați `;` după `x / 2` în al doilea exemplu." -#: src/control-flow-basics/conditionals.md +#: src/control-flow-basics/if.md:38 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." msgstr "" +"Atunci când `if` este utilizat într-o expresie, expresia trebuie să aibă un " +"`;` pentru a o separa de următoarea declarație. Eliminați `;` înainte de " +"`println!` pentru a vedea eroarea de compilare." -#: src/control-flow-basics/loops.md +#: src/control-flow-basics/loops.md:3 msgid "There are three looping keywords in Rust: `while`, `loop`, and `for`:" msgstr "" +"În Rust există trei cuvinte cheie pentru bucle: `while`, `loop` și `for`:" -#: src/control-flow-basics/loops.md -#, fuzzy +#: src/control-flow-basics/loops.md:5 msgid "`while`" -msgstr "bucle `while`" +msgstr "Bucle `while let`" -#: src/control-flow-basics/loops.md -#, fuzzy +#: src/control-flow-basics/loops.md:7 msgid "" "The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-" "expr.html#predicate-loops) works much like in other languages, executing the " @@ -3475,67 +3491,53 @@ msgid "" msgstr "" "Cuvântul cheie [`while`](https://doc.rust-lang.org/reference/expressions/" "loop-expr.html#predicate-loops) funcționează foarte asemănător cu alte " -"limbaje:" +"limbaje, executând bucla cât timp condiția este adevărată." -#: src/control-flow-basics/loops.md +#: src/control-flow-basics/loops.md:18 msgid "\"Final x: {x}\"" -msgstr "" - -#: src/control-flow-basics/loops.md -#, fuzzy -msgid "`for`" -msgstr "bucle `for`" +msgstr "\"Final x: {x}\"" -#: src/control-flow-basics/loops.md +#: src/control-flow-basics/loops/for.md:3 #, fuzzy msgid "" "The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) iterates " -"over ranges of values:" -msgstr "" -"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) utilizat pentru " -"definirea destructoriilor." - -#: src/control-flow-basics/loops.md -msgid "`loop`" -msgstr "" - -#: src/control-flow-basics/loops.md -#, fuzzy -msgid "" -"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just " -"loops forever, until a `break`." +"over ranges of values or the items in a collection:" msgstr "" -"[`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop.html) utilizat pentru " -"definirea destructoriilor." +"Buclele [`for`](https://doc.rust-lang.org/std/keyword.for.html) sunt " +"utilizate pentru a itera peste o gamă de valori:" -#: src/control-flow-basics/loops.md -msgid "\"{i}\"" +#: src/control-flow-basics/loops/for.md:13 +msgid "\"elem: {elem}\"" msgstr "" -#: src/control-flow-basics/loops.md +#: src/control-flow-basics/loops/for.md:20 msgid "" -"We will discuss iteration later; for now, just stick to range expressions." +"Under the hood `for` loops use a concept called \"iterators\" to handle " +"iterating over different kinds of ranges/collections. Iterators will be " +"discussed in more detail later." msgstr "" -#: src/control-flow-basics/loops.md +#: src/control-flow-basics/loops/for.md:23 msgid "" "Note that the `for` loop only iterates to `4`. Show the `1..=5` syntax for " "an inclusive range." msgstr "" +"Rețineți că bucla `for` va itera doar până la `4`. Prezentați sintaxa `1.." +"=5` pentru un interval inclusiv." -#: src/control-flow-basics/break-continue.md -#, fuzzy +#: src/control-flow-basics/loops/loop.md:3 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 " -"`loop`, this can take an optional expression that becomes the value of the " -"`loop` expression." +"The [`loop` statement](https://doc.rust-lang.org/std/keyword.loop.html) just " +"loops forever, until a `break`." msgstr "" -"Dacă doriți să ieșiți mai devreme dintr-o buclă, utilizați [`break`](https://" -"doc.rust-lang.org/reference/expressions/loop-expr.html#break-expressions)," +"Buclele [`loop`](https://doc.rust-lang.org/std/keyword.loop.html) rulează în " +"continuu până se întâlnește o instrucțiune `break`." -#: src/control-flow-basics/break-continue.md -#, fuzzy +#: src/control-flow-basics/loops/loop.md:11 +msgid "\"{i}\"" +msgstr "“{i}”" + +#: src/control-flow-basics/break-continue.md:3 msgid "" "If you want to immediately start the next iteration use [`continue`](https://" "doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions)." @@ -3544,12 +3546,28 @@ msgstr "" "(https://doc.rust-lang.org/reference/expressions/loop-expr.html#continue-" "expressions)." -#: src/control-flow-basics/break-continue.md -msgid "\"{result}\"" +#: src/control-flow-basics/break-continue.md:6 +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 " +"`loop`, this can take an optional expression that becomes the value of the " +"`loop` expression." msgstr "" +"Dacă doriți să ieșiți mai devreme dintr-o buclă, utilizați [`break`](https://" +"doc.rust-lang.org/reference/expressions/loop-expr.html#break-expressions). " +"`loop` poate folosi o expresie opțională care devine valoarea buclei." -#: src/control-flow-basics/break-continue.md +#: src/control-flow-basics/break-continue.md:22 src/std-traits/exercise.md:23 +#: src/std-traits/solution.md:29 src/smart-pointers/trait-objects.md:93 +#: src/smart-pointers/trait-objects.md:94 src/modules/exercise.md:136 +#: src/modules/solution.md:78 src/android/build-rules/library.md:44 +#: src/android/interoperability/cpp/rust-bridge.md:17 +#: src/async/pitfalls/cancellation.md:59 #, fuzzy +msgid "\"{}\"" +msgstr "\"{}\"" + +#: src/control-flow-basics/break-continue/labels.md:3 msgid "" "Both `continue` and `break` can optionally take a label argument which is " "used to break out of nested loops:" @@ -3557,35 +3575,25 @@ msgstr "" "Atât `continue`, cât și `break` pot primi opțional un argument de tip label, " "care este utilizat pentru a ieși din buclele imbricate:" -#: src/control-flow-basics/break-continue.md -msgid "\"x: {x}, i: {i}\"" -msgstr "" - -#: src/control-flow-basics/break-continue.md -#, fuzzy -msgid "" -"In this case we break the outer loop after 3 iterations of the inner loop." +#: src/control-flow-basics/break-continue/labels.md:19 +msgid "\"elements searched: {elements_searched}\"" msgstr "" -"În acest caz, întrerupem bucla exterioară după 3 iterații ale buclei " -"interioare." -#: src/control-flow-basics/break-continue.md -#, fuzzy +#: src/control-flow-basics/break-continue/labels.md:25 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)." msgstr "" "Rețineți că `loop` este singura construcție de buclă care returnează o " -"valoare non-trivială. Acest lucru se datorează faptului că este garantat să " -"fie introdus cel puțin o dată (spre deosebire de buclele `while` și `for`)." +"valoare non-trivială. Garantează că bocla este rulată cel puțin o dată (spre " +"deosebire de buclele `while` și `for`)." -#: src/control-flow-basics/blocks-and-scopes.md +#: src/control-flow-basics/blocks-and-scopes.md:3 msgid "Blocks" msgstr "Blocuri" -#: src/control-flow-basics/blocks-and-scopes.md -#, fuzzy +#: src/control-flow-basics/blocks-and-scopes.md:5 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 " @@ -3594,12 +3602,11 @@ msgstr "" "Un bloc în Rust conține o secvență de expresii. Fiecare bloc are o valoare " "și un tip, care sunt cele ale ultimei expresii din bloc:" -#: src/control-flow-basics/blocks-and-scopes.md +#: src/control-flow-basics/blocks-and-scopes.md:14 msgid "\"y: {y}\"" -msgstr "" +msgstr "“y: {y}”" -#: src/control-flow-basics/blocks-and-scopes.md -#, fuzzy +#: src/control-flow-basics/blocks-and-scopes.md:21 msgid "" "If the last expression ends with `;`, then the resulting value and type is " "`()`." @@ -3607,97 +3614,92 @@ msgstr "" "Dacă ultima expresie se termină cu `;`, atunci valoarea și tipul rezultat " "este `()`." -#: src/control-flow-basics/blocks-and-scopes.md -msgid "Scopes and Shadowing" -msgstr "Scopuri și mascări" +#: src/control-flow-basics/blocks-and-scopes.md:26 +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 "" +"Puteți arăta cum se modifică valoarea blocului modificând ultima linie din " +"bloc. De exemplu, adăugând/eliminând un punct și virgulă sau folosind un " +"`return`." -#: src/control-flow-basics/blocks-and-scopes.md +#: src/control-flow-basics/blocks-and-scopes/scopes.md:3 msgid "A variable's scope is limited to the enclosing block." msgstr "" +"Domeniul de aplicare al unei variabile este limitat la blocul care o conține." -#: src/control-flow-basics/blocks-and-scopes.md -#, fuzzy +#: src/control-flow-basics/blocks-and-scopes/scopes.md:5 msgid "" "You can shadow variables, both those from outer scopes and variables from " "the same scope:" msgstr "" -"Puteți umbri variabilele, atât cele din domenii de aplicare exterioare, cât " -"și variabilele din același domeniu de aplicare:" +"Puteți dedubla variabilele, atât cele din domenii de aplicare exterioare, " +"cât și variabilele din același domeniu de aplicare:" -#: src/control-flow-basics/blocks-and-scopes.md +#: src/control-flow-basics/blocks-and-scopes/scopes.md:11 msgid "\"before: {a}\"" -msgstr "" +msgstr "“înainte: {a}”" -#: src/control-flow-basics/blocks-and-scopes.md src/std-traits/from-and-into.md -#: src/slices-and-lifetimes/solution.md +#: src/control-flow-basics/blocks-and-scopes/scopes.md:13 +#: src/generics/exercise.md:18 src/generics/solution.md:20 +#: src/std-traits/from-and-into.md:7 src/std-traits/from-and-into.md:19 +#: src/lifetimes/solution.md:225 msgid "\"hello\"" -msgstr "" +msgstr "“hello”" -#: src/control-flow-basics/blocks-and-scopes.md +#: src/control-flow-basics/blocks-and-scopes/scopes.md:14 msgid "\"inner scope: {a}\"" -msgstr "" +msgstr "\"domeniul de aplicare interior: {a}\"" -#: src/control-flow-basics/blocks-and-scopes.md +#: src/control-flow-basics/blocks-and-scopes/scopes.md:17 msgid "\"shadowed in inner scope: {a}\"" -msgstr "" +msgstr "“dedublată în domeniul interior: {a}\"" -#: src/control-flow-basics/blocks-and-scopes.md +#: src/control-flow-basics/blocks-and-scopes/scopes.md:20 msgid "\"after: {a}\"" -msgstr "" - -#: src/control-flow-basics/blocks-and-scopes.md -#, fuzzy -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 "" -"Puteți arăta cum se modifică valoarea blocului modificând ultima linie din " -"bloc. De exemplu, adăugând/eliminând un punct și virgulă sau folosind un " -"`return`." +msgstr "“đupă: {a}”" -#: src/control-flow-basics/blocks-and-scopes.md +#: src/control-flow-basics/blocks-and-scopes/scopes.md:26 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 "" +"Arătați că domeniul de aplicare al unei variabile este limitat prin " +"adăugarea unui `b` în blocul interior din ultimul exemplu și apoi prin " +"încercarea de a o accesa în afara blocului." -#: src/control-flow-basics/blocks-and-scopes.md -#, fuzzy +#: src/control-flow-basics/blocks-and-scopes/scopes.md:28 msgid "" "Shadowing is different from mutation, because after shadowing both " "variable's memory locations exist at the same time. Both are available under " "the same name, depending where you use it in the code." msgstr "" -"Definiție: Shadowing este diferit de mutație, deoarece după shadowing ambele " -"locații de memorie ale variabilei există în același timp. Ambele sunt " +"Definiție: Dedublarea este diferită de mutație, deoarece după dedublare " +"ambele locații de memorie ale variabilei există în același timp. Ambele sunt " "disponibile sub același nume, în funcție de locul în care se utilizează în " "cod." -#: src/control-flow-basics/blocks-and-scopes.md -#, fuzzy +#: src/control-flow-basics/blocks-and-scopes/scopes.md:31 msgid "A shadowing variable can have a different type." -msgstr "O variabilă de umbrire poate avea un tip diferit." +msgstr "O variabilă dedublată poate avea un tip diferit." -#: src/control-flow-basics/blocks-and-scopes.md -#, fuzzy +#: src/control-flow-basics/blocks-and-scopes/scopes.md:32 msgid "" "Shadowing looks obscure at first, but is convenient for holding on to values " "after `.unwrap()`." msgstr "" -"Umbrirea pare obscură la început, dar este convenabilă pentru a păstra " +"Dedublarea pare obscură la început, dar este convenabilă pentru a păstra " "valorile după `.unwrap()`." -#: src/control-flow-basics/functions.md -#, fuzzy +#: src/control-flow-basics/functions.md:22 msgid "" "Declaration parameters are followed by a type (the reverse of some " "programming languages), then a return type." msgstr "" -"Parametrii de declarație sunt urmați de un tip (invers decât în unele " -"limbaje de programare), apoi de un tip de returnare." +"Parametrii de declarație sunt urmați de un tip (invers decât în alte limbaje " +"de programare), apoi de tipul valorii returnate." -#: src/control-flow-basics/functions.md -#, fuzzy +#: src/control-flow-basics/functions.md:24 msgid "" "The last expression in a function body (or any block) becomes the return " "value. Simply omit the `;` at the end of the expression. The `return` " @@ -3705,354 +3707,354 @@ msgid "" "idiomatic at the end of a function (refactor `gcd` to use a `return`)." msgstr "" "Ultima expresie din corpul unei funcții (sau din orice bloc) devine valoarea " -"de returnare. Pur și simplu omiteți `;` de la sfârșitul expresiei." +"de returnare. Pur și simplu omiteți `;` de la sfârșitul expresiei. Cuvântul " +"cheie `return` se poate folosi pentru a ieși anticipat din funcție, dar " +"“valoarea brută” este idiomatică la sfârșitul funcției (rescrieți `gcr` " +"pentru a utiliza un `return`)." -#: src/control-flow-basics/functions.md -#, fuzzy +#: src/control-flow-basics/functions.md:28 msgid "" "Some functions have no return value, and return the 'unit type', `()`. The " "compiler will infer this if the `-> ()` return type is omitted." msgstr "" -"Unele funcții nu au nicio valoare de retur și returnează \"tipul de " -"unitate\", `()`. Compilatorul va deduce acest lucru în cazul în care tipul " -"de returnare `-> ()` este omis." +"Unele funcții nu au nicio valoare de retur și returnează \"tipul unitate\", " +"`()`. Compilatorul va deduce acest lucru în cazul în care tipul de returnare " +"`-> ()` este omis." -#: src/control-flow-basics/functions.md -#, fuzzy +#: src/control-flow-basics/functions.md:30 msgid "" "Overloading is not supported -- each function has a single implementation." -msgstr "Fiecare funcție are o singură implementare:" +msgstr "" +"Supraîncărcarea nu este suportată — fiecare funcție are o singură " +"implementare." -#: src/control-flow-basics/functions.md +#: src/control-flow-basics/functions.md:31 msgid "" "Always takes a fixed number of parameters. Default arguments are not " "supported. Macros can be used to support variadic functions." msgstr "" +"Acceptă întotdeauna un număr fix de parametri. Argumentele implicite nu sunt " +"acceptate. Se pot utiliza macrocomenzi pentru a sprijini funcțiile variadice." -#: src/control-flow-basics/functions.md -#, fuzzy +#: src/control-flow-basics/functions.md:33 msgid "" "Always takes a single set of parameter types. These types can be generic, " "which will be covered later." -msgstr "Acceptă întotdeauna un singur set de tipuri de parametri." +msgstr "" +"Acceptă întotdeauna un singur set de tipuri de parametri. Acestea pot fi " +"generice, despre care vom discuta mai târziu." -#: src/control-flow-basics/macros.md +#: src/control-flow-basics/macros.md:3 msgid "" "Macros are expanded into Rust code during compilation, and can take a " "variable number of arguments. They are distinguished by a `!` at the end. " "The Rust standard library includes an assortment of useful macros." msgstr "" +"Macrocomenzile sunt expandate în codul Rust în timpul compilării și pot " +"primi un număr variabil de argumente. Ele se disting prin adăugarea unui `!` " +"la sfârșit. Biblioteca standard Rust include o gamă întreagă de macro-uri " +"utile." -#: src/control-flow-basics/macros.md -#, fuzzy +#: src/control-flow-basics/macros.md:7 msgid "" "`println!(format, ..)` prints a line to standard output, applying formatting " "described in [`std::fmt`](https://doc.rust-lang.org/std/fmt/index.html)." msgstr "" -"Supraîncărcarea operatorilor este implementată prin intermediul trăsăturilor " -"în [`std::ops`](https://doc.rust-lang.org/std/ops/index.html):" +"`println!(format, ..)` afișează o linie la ieșirea standard, aplicând " +"formatarea specificată în [`std::fmt`](https://doc.rust-lang.org/std/fmt/" +"index.html)." -#: src/control-flow-basics/macros.md +#: src/control-flow-basics/macros.md:9 msgid "" "`format!(format, ..)` works just like `println!` but returns the result as a " "string." msgstr "" +"`format!(format, ..)` funcționează la fel ca `println!`, dar returnează " +"rezultatul sub forma unui șir de caractere." -#: src/control-flow-basics/macros.md +#: src/control-flow-basics/macros.md:11 msgid "`dbg!(expression)` logs the value of the expression and returns it." -msgstr "" +msgstr "`dbg!(expresie)` înregistrează valoarea expresiei și o returnează." -#: src/control-flow-basics/macros.md +#: src/control-flow-basics/macros.md:12 msgid "" "`todo!()` marks a bit of code as not-yet-implemented. If executed, it will " "panic." msgstr "" +"`todo!()` marchează o bucată de cod ca fiind neimplementată încă. Dacă este " +"executat, va intra în panică." -#: src/control-flow-basics/macros.md +#: src/control-flow-basics/macros.md:14 msgid "" "`unreachable!()` marks a bit of code as unreachable. If executed, it will " "panic." msgstr "" +"`unreachable!()` marchează un fragment de cod ca fiind inaccesibil. Dacă " +"este executat, programul va intra în panică." -#: src/control-flow-basics/macros.md +#: src/control-flow-basics/macros.md:32 msgid "\"{n}! = {}\"" -msgstr "" +msgstr "“{n}! = {}”" -#: src/control-flow-basics/macros.md +#: src/control-flow-basics/macros.md:39 msgid "" "The takeaway from this section is that these common conveniences exist, and " "how to use them. Why they are defined as macros, and what they expand to, is " "not especially critical." msgstr "" +"Trebuie să rețineți cum să folosiți aceste facilități comune. De ce sunt " +"definite ca macro-uri și la ce se extind acestea nu este deosebit de " +"important." -#: src/control-flow-basics/macros.md +#: src/control-flow-basics/macros.md:43 +#, fuzzy msgid "" "The course does not cover defining macros, but a later section will describe " "use of derive macros." msgstr "" +"Cursul nu acoperă definirea macrocomenzilor, dar o secțiune ulterioară va " +"descrie utilizarea macrocomenzilor `derive`." -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:3 msgid "" "The [Collatz Sequence](https://en.wikipedia.org/wiki/Collatz_conjecture) is " "defined as follows, for an arbitrary n" msgstr "" +"[Secvența Collatz](https://en.wikipedia.org/wiki/Collatz_conjecture) se " +"definește după cum urmează, pentru un număr n arbitrar" -#: src/control-flow-basics/exercise.md -#, fuzzy +#: src/control-flow-basics/exercise.md:4 src/control-flow-basics/exercise.md:10 msgid "1" -msgstr "12" +msgstr "1" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:4 msgid " greater than zero:" -msgstr "" +msgstr " mai mare decât zero:" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:6 src/control-flow-basics/exercise.md:7 +#: src/control-flow-basics/exercise.md:8 msgid "If _n" -msgstr "" +msgstr "If _n" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:6 src/control-flow-basics/exercise.md:7 +#: src/control-flow-basics/exercise.md:8 msgid "i" -msgstr "" +msgstr "i" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:6 msgid "_ is 1, then the sequence terminates at _n" -msgstr "" +msgstr "_ este 1, atunci secvența se termină la _n" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:6 msgid "_." -msgstr "" +msgstr "_." -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:7 msgid "_ is even, then _n" -msgstr "" +msgstr "_ este par, atunci _n" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:7 src/control-flow-basics/exercise.md:8 msgid "i+1" -msgstr "" +msgstr "i+1" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:7 msgid " = n" -msgstr "" +msgstr " = n" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:7 msgid " / 2_." -msgstr "" +msgstr " / 2_." -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:8 msgid "_ is odd, then _n" -msgstr "" +msgstr "_ este impar, atunci _n" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:8 msgid " = 3 * n" -msgstr "" +msgstr " = 3 * n" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:8 msgid " + 1_." -msgstr "" +msgstr " + 1_." -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:10 msgid "For example, beginning with _n" -msgstr "" +msgstr "De exemplu, începând cu _n" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:10 msgid "_ = 3:" -msgstr "" +msgstr "_ = 3:" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:12 msgid "3 is odd, so _n" -msgstr "" +msgstr "3 este impar, deci _n" -#: src/control-flow-basics/exercise.md -#, fuzzy +#: src/control-flow-basics/exercise.md:12 msgid "2" -msgstr "12" +msgstr "2" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:12 msgid "_ = 3 * 3 + 1 = 10;" -msgstr "" +msgstr "_ = 3 * 3 + 1 = 10;" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:13 msgid "10 is even, so _n" -msgstr "" +msgstr "10 este par, deci _n" -#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md +#: src/control-flow-basics/exercise.md:13 src/bare-metal/aps/better-uart.md:22 msgid "3" msgstr "3" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:13 msgid "_ = 10 / 2 = 5;" -msgstr "" +msgstr "_ = 10 / 2 = 5;" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:14 msgid "5 is odd, so _n" -msgstr "" +msgstr "5 este impar, deci _n" -#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md +#: src/control-flow-basics/exercise.md:14 src/bare-metal/aps/better-uart.md:10 msgid "4" msgstr "4" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:14 msgid "_ = 3 * 5 + 1 = 16;" -msgstr "" +msgstr "_ = 3 * 5 + 1 = 16;" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:15 msgid "16 is even, so _n" -msgstr "" +msgstr "16 este par, deci _n" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:15 msgid "5" -msgstr "" +msgstr "5" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:15 msgid "_ = 16 / 2 = 8;" -msgstr "" +msgstr "_ = 16 / 2 = 8;" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:16 msgid "8 is even, so _n" -msgstr "" +msgstr "8 este par, deci _n" -#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md +#: src/control-flow-basics/exercise.md:16 src/bare-metal/aps/better-uart.md:14 +#: src/bare-metal/aps/better-uart.md:17 msgid "6" msgstr "6" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:16 msgid "_ = 8 / 2 = 4;" -msgstr "" +msgstr "_ = 8 / 2 = 4;" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:17 msgid "4 is even, so _n" -msgstr "" +msgstr "4 este par, deci _n" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:17 msgid "7" -msgstr "" +msgstr "7" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:17 msgid "_ = 4 / 2 = 2;" -msgstr "" +msgstr "_ = 4 / 2 = 2;" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:18 msgid "2 is even, so _n" -msgstr "" +msgstr "2 este par, deci _n" -#: src/control-flow-basics/exercise.md src/bare-metal/aps/better-uart.md +#: src/control-flow-basics/exercise.md:18 src/bare-metal/aps/better-uart.md:12 +#: src/bare-metal/aps/better-uart.md:15 msgid "8" msgstr "8" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:18 msgid "_ = 1; and" -msgstr "" +msgstr "_ = 1; and" -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:19 msgid "the sequence terminates." -msgstr "" +msgstr "secvența se termină." -#: src/control-flow-basics/exercise.md +#: src/control-flow-basics/exercise.md:21 msgid "" "Write a function to calculate the length of the collatz sequence for a given " "initial `n`." msgstr "" +"Scrieți o funcție care să calculeze lungimea secvenței Collatz pentru un " +"anumit `n` inițial." -#: src/control-flow-basics/exercise.md src/control-flow-basics/solution.md +#: src/control-flow-basics/exercise.md:25 src/control-flow-basics/solution.md:4 msgid "/// Determine the length of the collatz sequence beginning at `n`.\n" -msgstr "" +msgstr "/// Determinați lungimea secvenței collatz care începe la `n`.\n" -#: src/control-flow-basics/solution.md src/concurrency/scoped-threads.md +#: src/control-flow-basics/solution.md:20 src/concurrency/scoped-threads.md:11 +#: src/concurrency/scoped-threads.md:30 msgid "\"Length: {}\"" -msgstr "" +msgstr "“Length: {}”" -#: src/welcome-day-1-afternoon.md src/welcome-day-2-afternoon.md -#: src/welcome-day-3-afternoon.md src/welcome-day-4-afternoon.md -#, fuzzy +#: src/welcome-day-1-afternoon.md:1 src/welcome-day-2-afternoon.md:1 +#: src/welcome-day-3-afternoon.md:1 src/welcome-day-4-afternoon.md:1 msgid "Welcome Back" -msgstr "Bine ați venit" +msgstr "Bine ați revenit" -#: src/welcome-day-1-afternoon.md -msgid "[Tuples and Arrays](./tuples-and-arrays.md) (1 hour)" -msgstr "" +#: src/welcome-day-1-afternoon.md:4 +#, fuzzy +msgid "[Tuples and Arrays](./tuples-and-arrays.md) (35 minutes)" +msgstr "[Tupluri și vectori](./tuples-and-arrays.md) (1 oră)" -#: src/welcome-day-1-afternoon.md -msgid "[References](./references.md) (50 minutes)" -msgstr "" +#: src/welcome-day-1-afternoon.md:5 +#, fuzzy +msgid "[References](./references.md) (55 minutes)" +msgstr "[Referințe](../references.md) (50 minute)" -#: src/welcome-day-1-afternoon.md +#: src/welcome-day-1-afternoon.md:6 msgid "[User-Defined Types](./user-defined-types.md) (50 minutes)" -msgstr "" +msgstr "[Tipuri definite de utilizator](../user-defined-types.md) (50 minute)" -#: src/welcome-day-1-afternoon.md +#: src/welcome-day-1-afternoon.md:8 +#, fuzzy msgid "" -"Including 10 minute breaks, this session should take about 2 hours and 55 " +"Including 10 minute breaks, this session should take about 2 hours and 35 " "minutes" msgstr "" +"Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze " +"aproximativ 2 ore și 55 de minute" -#: src/tuples-and-arrays.md -msgid "" -"[Tuples and Arrays](./tuples-and-arrays/tuples-and-arrays.md) (10 minutes)" -msgstr "" - -#: src/tuples-and-arrays.md -msgid "[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)" -msgstr "" - -#: src/tuples-and-arrays.md -msgid "[Pattern Matching](./tuples-and-arrays/match.md) (10 minutes)" +#: src/tuples-and-arrays.md:4 +#, fuzzy +msgid "[Arrays](./tuples-and-arrays/arrays.md) (5 minutes)" msgstr "" +"[Tupluri și vectori](./tuples-and-arrays/tuples-and-arrays.md) (10 minute)" -#: src/tuples-and-arrays.md -msgid "[Destructuring](./tuples-and-arrays/destructuring.md) (5 minutes)" +#: src/tuples-and-arrays.md:5 +#, fuzzy +msgid "[Tuples](./tuples-and-arrays/tuples.md) (5 minutes)" msgstr "" +"[Tupluri și vectori](./tuples-and-arrays/tuples-and-arrays.md) (10 minute)" -#: src/tuples-and-arrays.md -msgid "[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (30 minutes)" -msgstr "" +#: src/tuples-and-arrays.md:6 +msgid "[Array Iteration](./tuples-and-arrays/iteration.md) (3 minutes)" +msgstr "[Iterarea pe vectori](./tuples-and-arrays/iteration.md) (3 minute)" -#: src/tuples-and-arrays/tuples-and-arrays.md +#: src/tuples-and-arrays.md:7 +#, fuzzy msgid "" -"Tuples and arrays are the first \"compound\" types we have seen. All " -"elements of an array have the same type, while tuples can accommodate " -"different types. Both types have a size fixed at compile time." -msgstr "" - -#: src/tuples-and-arrays/tuples-and-arrays.md -#: src/tuples-and-arrays/destructuring.md -msgid "Arrays" -msgstr "Array-uri" - -#: src/tuples-and-arrays/tuples-and-arrays.md -msgid "`[T; N]`" -msgstr "`[T; N]`" - -#: src/tuples-and-arrays/tuples-and-arrays.md -msgid "`[20, 30, 40]`, `[0; 3]`" -msgstr "`[20, 30, 40]`, `[0; 3]`" - -#: src/tuples-and-arrays/tuples-and-arrays.md -#: src/tuples-and-arrays/destructuring.md -msgid "Tuples" -msgstr "Tupluri" - -#: src/tuples-and-arrays/tuples-and-arrays.md -msgid "`()`, `(T,)`, `(T1, T2)`, ..." -msgstr "`()`, `(T,)`, `(T1, T2)`, ..." - -#: src/tuples-and-arrays/tuples-and-arrays.md -msgid "`()`, `('x',)`, `('x', 1.2)`, ..." -msgstr "`()`, `('x',)`, `('x', 1.2)`, ..." - -#: src/tuples-and-arrays/tuples-and-arrays.md -msgid "Array assignment and access:" -msgstr "Atribuirea și accesul pentru vectori:" - -#: src/tuples-and-arrays/tuples-and-arrays.md -msgid "Tuple assignment and access:" -msgstr "Atribuirea și accesul pentru tupluri:" +"[Patterns and Destructuring](./tuples-and-arrays/destructuring.md) (5 " +"minutes)" +msgstr "[Destructurare](./tuples-and-arrays/destructuring.md) (5 minute)" -#: src/tuples-and-arrays/tuples-and-arrays.md -msgid "Arrays:" -msgstr "Vectori:" +#: src/tuples-and-arrays.md:8 +#, fuzzy +msgid "[Exercise: Nested Arrays](./tuples-and-arrays/exercise.md) (15 minutes)" +msgstr "" +"[Exercițiu: vectori imbricați](./tuples-and-arrays/exercise.mds) (30 minute)" -#: src/tuples-and-arrays/tuples-and-arrays.md +#: src/tuples-and-arrays.md:10 #, fuzzy +msgid "This segment should take about 35 minutes" +msgstr "Acest segment ar trebui să dureze aproximativ 55 de minute" + +#: src/tuples-and-arrays/arrays.md:16 msgid "" "A value of the array type `[T; N]` holds `N` (a compile-time constant) " "elements of the same type `T`. Note that the length of the array is _part of " @@ -4060,25 +4062,27 @@ msgid "" "different types. Slices, which have a size determined at runtime, are " "covered later." msgstr "" -"O valoare de tip matrice `[T; N]` conține `N` (o constantă de timp de " +"O valoare de tip tablou `[T; N]` conține `N` (o constantă de timp de " "compilare) elemente de același tip `T`. Rețineți că lungimea tabloului este " "_parte a tipului său_, ceea ce înseamnă că `[u8; 3]` și `[u8; 4]` sunt " "considerate două tipuri diferite." -#: src/tuples-and-arrays/tuples-and-arrays.md +#: src/tuples-and-arrays/arrays.md:22 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 "" +"Încercați să accesați un element de tablou în afara limitelor. Accesările " +"elementelor din tablou sunt verificate în timpul execuției. De obicei, Rust " +"poate optimiza aceste verificări, iar acestea pot fi evitate folosind unsafe " +"Rust." -#: src/tuples-and-arrays/tuples-and-arrays.md -#, fuzzy +#: src/tuples-and-arrays/arrays.md:26 msgid "We can use literals to assign values to arrays." -msgstr "Putem utiliza literali pentru a atribui valori la array-uri." +msgstr "Putem utiliza literali pentru a atribui valori la matrice." -#: src/tuples-and-arrays/tuples-and-arrays.md -#, fuzzy +#: src/tuples-and-arrays/arrays.md:28 msgid "" "The `println!` macro asks for the debug implementation with the `?` format " "parameter: `{}` gives the default output, `{:?}` gives the debug output. " @@ -4089,11 +4093,10 @@ msgstr "" "Macroul `println!` solicită implementarea de depanare cu parametrul de " "format `?`: `{}` oferă ieșirea implicită, `{:?}` oferă ieșirea de depanare. " "Tipuri precum întregi și șiruri de caractere implementează ieșirea " -"implicită, dar array-urile implementează doar ieșirea de depanare. Aceasta " +"implicită, dar matricile implementează doar ieșirea de depanare. Aceasta " "înseamnă că trebuie să folosim aici ieșirea de depanare." -#: src/tuples-and-arrays/tuples-and-arrays.md -#, fuzzy +#: src/tuples-and-arrays/arrays.md:33 msgid "" "Adding `#`, eg `{a:#?}`, invokes a \"pretty printing\" format, which can be " "easier to read." @@ -4101,20 +4104,15 @@ msgstr "" "Adăugând `#`, de exemplu `{a:#?}`, se invocă un format de tipărire " "\"frumos\", care poate fi mai ușor de citit." -#: src/tuples-and-arrays/tuples-and-arrays.md -msgid "Tuples:" -msgstr "Tupluri:" - -#: src/tuples-and-arrays/tuples-and-arrays.md +#: src/tuples-and-arrays/tuples.md:16 msgid "Like arrays, tuples have a fixed length." msgstr "Tuplurile au o lungime fixă, întocmai vectorilor." -#: src/tuples-and-arrays/tuples-and-arrays.md -#, fuzzy +#: src/tuples-and-arrays/tuples.md:18 msgid "Tuples group together values of different types into a compound type." msgstr "Tuplurile grupează valori de tipuri diferite într-un tip compus." -#: src/tuples-and-arrays/tuples-and-arrays.md +#: src/tuples-and-arrays/tuples.md:20 msgid "" "Fields of a tuple can be accessed by the period and the index of the value, " "e.g. `t.0`, `t.1`." @@ -4122,472 +4120,553 @@ msgstr "" "Câmpurile unui tuplu pot fi accesate prin punct și indicele valorii, de " "exemplu `t.0`, `t.1`." -#: src/tuples-and-arrays/tuples-and-arrays.md -#, fuzzy -msgid "" -"The empty tuple `()` is also known as the \"unit type\". It is both a type, " -"and the only valid value of that type --- that is to say both the type and " -"its value are expressed as `()`. It is used to indicate, for example, that a " -"function or expression has no return value, as we'll see in a future slide." -msgstr "" -"Tuplul goal `()` este cunoscută și sub numele de \"tip unitate\". Este atât " -"un tip, cât și singura valoare validă a acelui tip - adică atât tipul, cât " -"și valoarea sa sunt exprimate sub forma `()`. Este utilizat pentru a indica, " -"de exemplu, că o funcție sau o expresie nu are valoare de returnare, după " -"cum vom vedea într-un slide viitor." - -#: src/tuples-and-arrays/tuples-and-arrays.md -#, fuzzy +#: src/tuples-and-arrays/tuples.md:23 msgid "" -"You can think of it as `void` that can be familiar to you from other " -"programming languages." +"The empty tuple `()` is referred to as the \"unit type\" and signifies " +"absence of a return value, akin to `void` in other languages." msgstr "" -"Vă puteți gândi la el ca la un `void` care vă este familiar din alte limbaje " -"de programare." -#: src/tuples-and-arrays/iteration.md +#: src/tuples-and-arrays/iteration.md:3 msgid "The `for` statement supports iterating over arrays (but not tuples)." msgstr "" +"Instrucțiunea `for` permite iterația peste tablouri (dar nu și peste " +"tupluri)." -#: src/tuples-and-arrays/iteration.md +#: src/tuples-and-arrays/iteration.md:19 msgid "" "This functionality uses the `IntoIterator` trait, but we haven't covered " "that yet." msgstr "" +"Această funcționalitate utilizează trăsătura `IntoIterator`, dar încă nu am " +"abordată-o în cadrul cursului." -#: src/tuples-and-arrays/iteration.md +#: src/tuples-and-arrays/iteration.md:22 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 "" +"Macroul `assert_ne!` este nou aici. Există, de asemenea, macrourile " +"`assert_eq!` și `assert!`. Acestea sunt întotdeauna verificate, în timp ce " +"variantele destinate depanării, cum ar fi `debug_assert!`, nu se compilează " +"în versiunile de lansare." -#: src/tuples-and-arrays/match.md -#, fuzzy +#: src/tuples-and-arrays/destructuring.md:3 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." +"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 "" -"Cuvântul cheie `match` vă permite să comparați o valoare cu unul sau mai " -"multe _patterns_. Comparațiile se fac de sus în jos, iar prima potrivire " -"câștigă." - -#: src/tuples-and-arrays/match.md -#, fuzzy -msgid "The patterns can be simple values, similarly to `switch` in C and C++:" -msgstr "Modelele pot fi valori simple, la fel ca `switch` în C și C++:" -#: src/tuples-and-arrays/match.md -msgid "'x'" +#: src/tuples-and-arrays/destructuring.md:11 +#: src/tuples-and-arrays/destructuring.md:21 +msgid "\"left: {left}, right: {right}\"" msgstr "" -#: src/tuples-and-arrays/match.md -msgid "'q'" +#: src/tuples-and-arrays/destructuring.md:15 +msgid "" +"However, Rust also supports using pattern matching to destructure a larger " +"value into its constituent parts:" msgstr "" -#: src/tuples-and-arrays/match.md -msgid "\"Quitting\"" +#: src/tuples-and-arrays/destructuring.md:28 +msgid "" +"The patterns used here are \"irrefutable\", meaning that the compiler can " +"statically verify that the value on the right of `=` has the same structure " +"as the pattern." msgstr "" -#: src/tuples-and-arrays/match.md src/std-traits/solution.md -#: src/error-handling/exercise.md src/error-handling/solution.md -msgid "'a'" +#: src/tuples-and-arrays/destructuring.md:31 +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 "" -#: src/tuples-and-arrays/match.md -msgid "'s'" +#: src/tuples-and-arrays/destructuring.md:33 +msgid "" +"Rust also supports using patterns in conditionals, allowing for equality " +"comparison and destructuring to happen at the same time. This form of " +"pattern matching will be discussed in more detail later." msgstr "" -#: src/tuples-and-arrays/match.md -msgid "'w'" +#: src/tuples-and-arrays/destructuring.md:36 +msgid "" +"Edit the examples above to show the compiler error when the pattern doesn't " +"match the value being matched on." msgstr "" -#: src/tuples-and-arrays/match.md -msgid "'d'" -msgstr "" +#: src/tuples-and-arrays/exercise.md:3 +msgid "Arrays can contain other arrays:" +msgstr "Vectorii pot conține alți vectori:" -#: src/tuples-and-arrays/match.md -msgid "\"Moving around\"" -msgstr "" +#: src/tuples-and-arrays/exercise.md:9 +msgid "What is the type of this variable?" +msgstr "Care este tipul acestei variabile?" -#: src/tuples-and-arrays/match.md src/error-handling/exercise.md -#: src/error-handling/solution.md -msgid "'0'" +#: src/tuples-and-arrays/exercise.md:11 +msgid "" +"Use an array such as the above to write a function `transpose` which will " +"transpose a matrix (turn rows into columns):" msgstr "" +"Folosiți cele de mai sus pentru a scrie o funcție `transpose` care va " +"transpune o matrice (transformă rândurile în coloane):" -#: src/tuples-and-arrays/match.md src/error-handling/exercise.md -#: src/error-handling/solution.md -msgid "'9'" -msgstr "" +#: src/tuples-and-arrays/exercise.md:22 +msgid "Hard-code both functions to operate on 3 × 3 matrices." +msgstr "Codificați ambele funcții pentru a opera pe matrici 3 × 3." -#: src/tuples-and-arrays/match.md -msgid "\"Number input\"" +#: src/tuples-and-arrays/exercise.md:24 +msgid "" +"Copy the code below to and implement the " +"functions:" msgstr "" +"Copiați codul de mai jos în și implementați " +"funcțiile:" -#: src/tuples-and-arrays/match.md -msgid "\"Lowercase: {key}\"" +#: src/tuples-and-arrays/exercise.md:28 src/borrowing/exercise.md:14 +#: src/unsafe-rust/exercise.md:51 +msgid "// TODO: remove this when you're done with your implementation.\n" msgstr "" +"// TODO: eliminați acest comentariu atunci când ați terminat cu " +"implementarea.\n" -#: src/tuples-and-arrays/match.md -msgid "\"Something else\"" -msgstr "" +#: src/tuples-and-arrays/exercise.md:38 src/tuples-and-arrays/exercise.md:46 +#: src/tuples-and-arrays/solution.md:17 src/tuples-and-arrays/solution.md:25 +msgid "//\n" +msgstr "//\n" -#: src/tuples-and-arrays/match.md -msgid "" -"The `_` pattern is a wildcard pattern which matches any value. The " -"expressions _must_ be irrefutable, meaning that it covers every possibility, " -"so `_` is often used as the final catch-all case." -msgstr "" +#: src/tuples-and-arrays/exercise.md:55 src/tuples-and-arrays/solution.md:34 +msgid "// <-- the comment makes rustfmt add a newline\n" +msgstr "// <-- comentariul face ca rustfmt să adauge o linie nouă\n" -#: src/tuples-and-arrays/match.md -#, fuzzy -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 "" -"La fel ca `if let`, fiecare braț de potrivire trebuie să aibă același tip. " -"Tipul este ultima expresie a blocului, dacă există. În exemplul de mai sus, " -"tipul este `()`." +#: src/tuples-and-arrays/exercise.md:60 src/tuples-and-arrays/solution.md:39 +msgid "\"matrix: {:#?}\"" +msgstr "“Matricea: {:#?}”" -#: src/tuples-and-arrays/match.md -msgid "" -"A variable in the pattern (`key` in this example) will create a binding that " -"can be used within the match arm." -msgstr "" +#: src/tuples-and-arrays/exercise.md:62 src/tuples-and-arrays/solution.md:41 +msgid "\"transposed: {:#?}\"" +msgstr "\"transpus: {:#?}\"" -#: src/tuples-and-arrays/match.md -msgid "A match guard causes the arm to match only if the condition is true." -msgstr "" +#: src/references.md:4 +msgid "[Shared References](./references/shared.md) (10 minutes)" +msgstr "[Referințe partajate](./references/shared.md) (10 minute)" -#: src/tuples-and-arrays/match.md src/user-defined-types/named-structs.md -#: src/user-defined-types/enums.md src/methods-and-traits/methods.md -#, fuzzy -msgid "Key Points:" -msgstr "Puncte cheie:" +#: src/references.md:5 +msgid "[Exclusive References](./references/exclusive.md) (10 minutes)" +msgstr "[Referințe exclusive](./references/exclusive.md) (10 minute)" -#: src/tuples-and-arrays/match.md +#: src/references.md:6 #, fuzzy -msgid "" -"You might point out how some specific characters are being used when in a " -"pattern" -msgstr "" -"Ați putea sublinia modul în care sunt folosite anumite caractere specifice " -"atunci când se află într-un model" +msgid "[Slices: &\\[T\\]](./references/slices.md) (10 minutes)" +msgstr "[Slices: &\\[T\\]](./slices-and-lifetimes/slices.md) (10 minute)" -#: src/tuples-and-arrays/match.md +#: src/references.md:7 #, fuzzy -msgid "`|` as an `or`" -msgstr "`|` ca un `or`" +msgid "[Strings](./references/strings.md) (10 minutes)" +msgstr "[Șiruri](./types-and-values/strings.md) (10 minute)" -#: src/tuples-and-arrays/match.md +#: src/references.md:8 #, fuzzy -msgid "`..` can expand as much as it needs to be" -msgstr "`...` se poate extinde atât cât este nevoie" +msgid "[Exercise: Geometry](./references/exercise.md) (15 minutes)" +msgstr "[Exercițiu: Geometrie](./references/exercise.md) (30 minute)" -#: src/tuples-and-arrays/match.md +#: src/references.md:10 src/smart-pointers.md:9 src/error-handling.md:11 #, fuzzy -msgid "`1..=5` represents an inclusive range" -msgstr "`1..=5` reprezintă un interval inclusiv" +msgid "This segment should take about 55 minutes" +msgstr "Acest segment ar trebui să dureze aproximativ 55 de minute" -#: src/tuples-and-arrays/match.md +#: src/references/shared.md:3 #, fuzzy -msgid "`_` is a wild card" -msgstr "`_` este un wild card" +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." +msgstr "" +"O referință oferă o modalitate de a accesa o altă valoare fără a prelua " +"responsabilitatea pentru valoarea respectivă, fiind denumită și " +"\"împrumut\". Referințele partajate sunt numai pentru citire, iar datele la " +"care se face referire nu se pot modifica." -#: src/tuples-and-arrays/match.md +#: src/references/shared.md:20 #, fuzzy msgid "" -"Match guards as a separate syntax feature are important and necessary when " -"we wish to concisely express more complex ideas than patterns alone would " -"allow." +"A shared reference to a type `T` has type `&T`. A reference value is made " +"with the `&` operator. The `*` operator \"dereferences\" a reference, " +"yielding its value." msgstr "" -"Gărzile de potrivire, ca o caracteristică sintactică separată, sunt " -"importante și necesare atunci când dorim să exprimăm în mod concis idei mai " -"complexe decât ne-ar permite doar modelele." +"O referință partajată la un tip `T` are tipul `&T`. O valoare de referință " +"se realizează cu ajutorul operatorului `&`. Operatorul `*` \"de-" +"referențiază\" o referință, obținând valoarea acesteia." + +#: src/references/shared.md:24 +msgid "Rust will statically forbid dangling references:" +msgstr "Rust va interzice în mod static referințele invalide:" -#: src/tuples-and-arrays/match.md +#: src/references/shared.md:38 #, fuzzy msgid "" -"They are not the same as separate `if` expression inside of the match arm. " -"An `if` expression inside of the branch block (after `=>`) happens after the " -"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." +"A reference is said to \"borrow\" the value it refers to, and this is a good " +"model for students not familiar with pointers: code can use the reference to " +"access the value, but is still \"owned\" by the original variable. The " +"course will get into more detail on ownership in day 3." msgstr "" -"Acestea nu sunt același lucru cu expresia `if` separată în interiorul " -"brațului de potrivire. O expresie `if` în interiorul blocului de ramificare " -"(după `=>`) apare după ce este selectat brațul de potrivire. În cazul în " -"care nu se îndeplinește condiția `if` din interiorul blocului respectiv, nu " -"vor fi luate în considerare alte ramuri ale expresiei `match` originale." +"Se spune că o referință \"împrumută\" valoarea la care se referă, iar acesta " +"este un model bun pentru elevii care nu sunt familiarizați cu indicatoarele: " +"codul poate folosi referința pentru a accesa valoarea, dar este în " +"continuare \"deținută\" de variabila originală. Cursul va intra în mai multe " +"detalii despre proprietate în ziua 3." -#: src/tuples-and-arrays/match.md +#: src/references/shared.md:43 #, fuzzy msgid "" -"The condition defined in the guard applies to every expression in a pattern " -"with an `|`." +"References are implemented as pointers, and a key advantage is that they can " +"be much smaller than the thing they point to. Students familiar with C or C+" +"+ will recognize references as pointers. Later parts of the course will " +"cover how Rust prevents the memory-safety bugs that come from using raw " +"pointers." msgstr "" -"Condiția definită în gardă se aplică fiecărei expresii dintr-un model cu `|`." +"Referințele sunt implementate sub formă de pointeri, iar un avantaj cheie " +"este că pot fi mult mai mici decât obiectul spre care indică. Studenții " +"familiarizați cu C sau C++ vor recunoaște referințele ca fiind pointeri. " +"Părțile ulterioare ale cursului vor acoperi modul în care Rust previne " +"erorile de siguranță a memoriei care apar în cazul utilizării de pointeri " +"brute." -#: src/tuples-and-arrays/destructuring.md +#: src/references/shared.md:48 +#, fuzzy msgid "" -"Destructuring is a way of extracting data from a data structure by writing a " -"pattern that is matched up to the data structure, binding variables to " -"subcomponents of the data structure." +"Rust does not automatically create references for you - the `&` is always " +"required." msgstr "" +"Rust nu creează automat referințe pentru dumneavoastră - `&` este " +"întotdeauna necesar." -#: src/tuples-and-arrays/destructuring.md +#: src/references/shared.md:51 #, fuzzy -msgid "You can destructure tuples and arrays by matching on their elements:" +msgid "" +"Rust will auto-dereference in some cases, in particular when invoking " +"methods (try `r.is_ascii()`). There is no need for an `->` operator like in " +"C++." msgstr "" -"Puteți destructura array-uri, tuple și felii prin potrivirea elementelor " -"acestora:" +"Rust va face auto-dereferențiere în unele cazuri, în special atunci când " +"invocă metode (încercați `ref_x.count_ones()`)." -#: src/tuples-and-arrays/destructuring.md -msgid "\"on Y axis\"" +#: src/references/shared.md:54 +#, fuzzy +msgid "" +"In this example, `r` is mutable so that it can be reassigned (`r = &b`). " +"Note that this re-binds `r`, so that it refers to something else. This is " +"different from C++, where assignment to a reference changes the referenced " +"value." msgstr "" +"În acest exemplu, `r` este mutabil, astfel încât poate fi realocat (`r = " +"&b`). Rețineți că acest lucru reia `r`, astfel încât acesta se referă la " +"altceva. Acest lucru este diferit de C++, unde atribuirea unei referințe " +"modifică valoarea la care se face referire." -#: src/tuples-and-arrays/destructuring.md -msgid "\"on X axis\"" +#: src/references/shared.md:58 +#, fuzzy +msgid "" +"A shared reference does not allow modifying the value it refers to, even if " +"that value was mutable. Try `*r = 'X'`." msgstr "" +"O referință partajată nu permite modificarea valorii la care se referă, " +"chiar dacă valoarea respectivă era mutabilă. Încercați `*r = 'X'`." -#: src/tuples-and-arrays/destructuring.md -msgid "\"left of Y axis\"" +#: src/references/shared.md:61 +#, 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." msgstr "" +"Rust urmărește durata de viață a tuturor referințelor pentru a se asigura că " +"acestea trăiesc suficient de mult. În Rust sigur nu pot apărea referințe " +"care să stea în suspensie. `x_axis` ar trebui să returneze o referință la " +"`point`, dar `point` va fi dezalocat atunci când funcția se întoarce, deci " +"nu va fi compilat." -#: src/tuples-and-arrays/destructuring.md -msgid "\"below X axis\"" +#: src/references/shared.md:66 +msgid "We will talk more about borrowing when we get to ownership." msgstr "" +"Vom vorbi mai multe despre împrumuturi atunci când vom ajunge la posesie." -#: src/tuples-and-arrays/destructuring.md -msgid "\"first quadrant\"" +#: src/references/exclusive.md:3 +#, fuzzy +msgid "" +"Exclusive references, also known as mutable references, allow changing the " +"value they refer to. They have type `&mut T`." msgstr "" +"Referințele exclusive, cunoscute și sub denumirea de referințe mutabile, " +"permit modificarea valorii la care se referă. Ele au tipul `&mut T`." -#: src/tuples-and-arrays/destructuring.md -msgid "\"Tell me about {triple:?}\"" +#: src/references/exclusive.md:22 +#, fuzzy +msgid "" +"\"Exclusive\" means that only this reference can be used to access the " +"value. No other references (shared or exclusive) can exist at the same time, " +"and the referenced value cannot be accessed while the exclusive reference " +"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is " +"alive." msgstr "" +"\"Exclusiv\" înseamnă că numai această referință poate fi utilizată pentru a " +"accesa valoarea. Nici o altă referință (partajată sau exclusivă) nu poate " +"exista în același timp, iar valoarea la care se face referire nu poate fi " +"accesată atât timp cât există o referință exclusivă. Încercați să faceți un " +"`&punct.0` sau să modificați `punct.0` în timp ce `x_coord` este în viață." -#: src/tuples-and-arrays/destructuring.md -msgid "\"First is 0, y = {y}, and z = {z}\"" +#: src/references/exclusive.md:27 +#, fuzzy +msgid "" +"Be sure to note the difference between `let mut x_coord: &i32` and `let " +"x_coord: &mut i32`. The first one represents a shared reference which can be " +"bound to different values, while the second represents an exclusive " +"reference to a mutable value." msgstr "" +"Nu uitați să observați diferența dintre `let mut ref_x: &i32` și `let ref_x: " +"&mut i32`. Primul reprezintă o referință mutabilă care poate fi legată la " +"diferite valori, în timp ce al doilea reprezintă o referință la o valoare " +"mutabilă." -#: src/tuples-and-arrays/destructuring.md -msgid "\"First is 1 and the rest were ignored\"" -msgstr "" +#: src/references/slices.md:1 +msgid "Slices" +msgstr "Felii" -#: src/tuples-and-arrays/destructuring.md -msgid "\"All elements were ignored\"" -msgstr "" +#: src/references/slices.md:3 +msgid "A slice gives you a view into a larger collection:" +msgstr "O felie (elice) vă oferă o imagine a unei colecții mai mari:" -#: src/tuples-and-arrays/destructuring.md +#: src/references/slices.md:18 #, fuzzy -msgid "Create a new array pattern using `_` to represent an element." -msgstr "Creați un nou model folosind `_` pentru a reprezenta un element." +msgid "Slices borrow data from the sliced type." +msgstr "Feliile împrumută date din tipul porționat." -#: src/tuples-and-arrays/destructuring.md -#, fuzzy -msgid "Add more values to the array." -msgstr "Adăugați mai multe valori la matrice." +#: src/references/slices.md:19 +msgid "Question: What happens if you modify `a[3]` right before printing `s`?" +msgstr "" +"Întrebare: Ce se întâmplă dacă modificați `a[3]` chiar înainte de a afișa " +"`s`?" -#: src/tuples-and-arrays/destructuring.md -#, fuzzy +#: src/references/slices.md:24 msgid "" -"Point out that how `..` will expand to account for different number of " -"elements." +"We create a slice by borrowing `a` and specifying the starting and ending " +"indexes in brackets." msgstr "" -"Arătați cum `...` se va extinde pentru a lua în considerare un număr diferit " -"de elemente." - -#: src/tuples-and-arrays/destructuring.md -#, fuzzy -msgid "Show matching against the tail with patterns `[.., b]` and `[a@..,b]`" -msgstr "Afișează potrivirea cu coada cu modelele `[.., b]` și `[a@..,b]`" +"Creăm o felie prin împrumutarea lui `a` și specificarea indicilor de început " +"și de sfârșit între paranteze." -#: src/tuples-and-arrays/exercise.md -msgid "Arrays can contain other arrays:" +#: src/references/slices.md:27 +msgid "" +"If the slice starts at index 0, Rust’s range syntax allows us to drop the " +"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are " +"identical." msgstr "" +"Dacă felia începe la indexul 0, sintaxa intervalului din Rust ne permite să " +"renunțăm la indexul de pornire, ceea ce înseamnă că `&a[0..a.len()]` și " +"`&a[..a.len()]` sunt identice." -#: src/tuples-and-arrays/exercise.md -#, fuzzy -msgid "What is the type of this variable?" -msgstr "Care este tipul de `word` în fiecare buclă?" - -#: src/tuples-and-arrays/exercise.md -#, fuzzy +#: src/references/slices.md:31 msgid "" -"Use an array such as the above to write a function `transpose` which will " -"transpose a matrix (turn rows into columns):" +"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are " +"identical." msgstr "" -"Folosiți cele de mai sus pentru a scrie o funcție `pretty_print` care " -"tipărește o matrice și o funcție `transpose` care va transpune o matrice " -"(transformă rândurile în coloane):" - -#: src/tuples-and-arrays/exercise.md -#, fuzzy -msgid "Hard-code both functions to operate on 3 × 3 matrices." -msgstr "Codificați ambele funcții pentru a opera pe matrici 3 × 3." +"Același lucru este valabil și pentru ultimul indice, astfel încât `&a[2..a." +"len()]` și `&a[2..]` sunt identice." -#: src/tuples-and-arrays/exercise.md +#: src/references/slices.md:34 #, fuzzy msgid "" -"Copy the code below to and implement the " -"functions:" -msgstr "" -"Copiați codul de mai jos în și implementați " -"funcțiile:" - -#: 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" +"To easily create a slice of the full array, we can therefore use `&a[..]`." msgstr "" +"Pentru a crea cu ușurință o porțiune din întrega matrice, putem folosi " +"`&a[...]`." -#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md -msgid "// <-- the comment makes rustfmt add a newline\n" +#: src/references/slices.md:36 +#, fuzzy +msgid "" +"`s` is a reference to a slice of `i32`s. Notice that the type of `s` " +"(`&[i32]`) no longer mentions the array length. This allows us to perform " +"computation on slices of different sizes." msgstr "" +"`s` este o referință la o felie de `i32`s. Observați că tipul lui `s` " +"(`&[i32]`) nu mai menționează dimensiunile matricei. Acest lucru ne permite " +"să efectuăm calcule pe felii de dimensiuni diferite." -#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md -msgid "\"matrix: {:#?}\"" +#: src/references/slices.md:40 +#, fuzzy +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 "" +"Feliile împrumută întotdeauna de la un alt obiect. În acest exemplu, `a` " +"trebuie să rămână \"în viață\" (în domeniul de aplicare) cel puțin cât felia " +"noastră. " -#: src/tuples-and-arrays/exercise.md src/tuples-and-arrays/solution.md -msgid "\"transposed: {:#?}\"" +#: src/references/slices.md:43 +#, fuzzy +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 "" +"Întrebarea despre modificarea lui `a[3]` poate stârni o discuție " +"interesantă, dar răspunsul este că, din motive de siguranță a memoriei, nu " +"se poate face acest lucru prin `a` în acest moment al execuției, dar se pot " +"citi datele atât din `a`, cât și din `s` în siguranță. Funcționează înainte " +"de a crea felia și din nou după `println`, când felia nu mai este utilizată. " +"Mai multe detalii vor fi explicate în secțiunea de verificare a " +"împrumuturilor." -#: src/tuples-and-arrays/solution.md -msgid "//\n" -msgstr "" +#: src/references/strings.md:7 +#, fuzzy +msgid "We can now understand the two string types in Rust:" +msgstr "Acum putem înțelege cele două tipuri de șiruri de caractere în Rust:" -#: src/references.md -msgid "[Shared References](./references/shared.md) (10 minutes)" +#: src/references/strings.md:9 +msgid "`&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`." msgstr "" -#: src/references.md -msgid "[Exclusive References](./references/exclusive.md) (10 minutes)" +#: src/references/strings.md:10 +msgid "`String` is an owned, heap-allocated buffer of UTF-8 bytes." msgstr "" -#: src/references.md -msgid "[Exercise: Geometry](./references/exercise.md) (30 minutes)" -msgstr "" +#: src/references/strings.md:14 src/std-traits/read-and-write.md:36 +#, fuzzy +msgid "\"World\"" +msgstr "\"Lumea\"" -#: src/references.md src/user-defined-types.md src/pattern-matching.md -msgid "This segment should take about 50 minutes" -msgstr "" +#: src/references/strings.md:15 +#, fuzzy +msgid "\"s1: {s1}\"" +msgstr "\"s1: {s1}\"" -#: src/references/shared.md -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." -msgstr "" +#: src/references/strings.md:17 +#, fuzzy +msgid "\"Hello \"" +msgstr "“Hello”" -#: src/references/shared.md -msgid "" -"A shared reference to a type `T` has type `&T`. A reference value is made " -"with the `&` operator. The `*` operator \"dereferences\" a reference, " -"yielding its value." +#: src/references/strings.md:18 src/references/strings.md:20 +#: src/memory-management/move.md:9 +#, fuzzy +msgid "\"s2: {s2}\"" msgstr "" +"```rust,editable\n" +"fn main() {\n" +" let s1: String = String::from(“Hello!”);\n" +" let s2: String = s1;\n" +" println!(“s2: {s2}”);\n" +" // println!(“s1: {s1}”);\n" +"}\n" +"```" -#: src/references/shared.md +#: src/references/strings.md:23 #, fuzzy -msgid "Rust will statically forbid dangling references:" -msgstr "Rust va interzice în mod static referințele care atârnă:" - -#: src/references/shared.md -msgid "" -"A reference is said to \"borrow\" the value it refers to, and this is a good " -"model for students not familiar with pointers: code can use the reference to " -"access the value, but is still \"owned\" by the original variable. The " -"course will get into more detail on ownership in day 3." -msgstr "" +msgid "\"s3: {s3}\"" +msgstr "\"s3: {s3}\"" -#: src/references/shared.md +#: src/references/strings.md:30 +#, fuzzy msgid "" -"References are implemented as pointers, and a key advantage is that they can " -"be much smaller than the thing they point to. Students familiar with C or C+" -"+ will recognize references as pointers. Later parts of the course will " -"cover how Rust prevents the memory-safety bugs that come from using raw " -"pointers." +"`&str` introduces a string slice, which is an immutable reference to UTF-8 " +"encoded string data stored in a block of memory. String literals " +"(`\"Hello\"`), are stored in the program’s binary." msgstr "" +"`&str` indică o porțiune dintr-un șir de caractere, care este o referință " +"imuabilă la date de șir de caractere codificate UTF-8 stocate într-un bloc " +"de memorie. Șirurile literale (`\"Hello\"`) sunt stocate în binarul " +"programului." -#: src/references/shared.md +#: src/references/strings.md:34 +#, fuzzy msgid "" -"Rust does not automatically create references for you - the `&` is always " -"required." +"Rust's `String` type is a wrapper around a vector of bytes. As with a " +"`Vec`, it is owned." msgstr "" +"Tipul `String` (șir de caractere) din Rust este un înveliș în jurul unui " +"vector de octeți. La fel ca și în cazul unui `Vec`, acesta este propriu." -#: src/references/shared.md +#: src/references/strings.md:37 #, fuzzy msgid "" -"Rust will auto-dereference in some cases, in particular when invoking " -"methods (try `r.count_ones()`). There is no need for an `->` operator like " -"in C++." +"As with many other types `String::from()` creates a string from a string " +"literal; `String::new()` creates a new empty string, to which string data " +"can be added using the `push()` and `push_str()` methods." msgstr "" -"Rust va face auto-dereferențiere în unele cazuri, în special atunci când " -"invocă metode (încercați `ref_x.count_ones()`)." +"Ca și în cazul multor alte tipuri, `String::from()` creează un șir de " +"caractere dintr-un literal de șir; `String::new()` creează un nou șir de " +"caractere gol, la care se pot adăuga date de șiruri de caractere folosind " +"metodele `push()` și `push_str()`." -#: src/references/shared.md +#: src/references/strings.md:41 +#, fuzzy msgid "" -"In this example, `r` is mutable so that it can be reassigned (`r = &b`). " -"Note that this re-binds `r`, so that it refers to something else. This is " -"different from C++, where assignment to a reference changes the referenced " -"value." +"The `format!()` macro is a convenient way to generate an owned string from " +"dynamic values. It accepts the same format specification as `println!()`." msgstr "" +"Macroul `format!()` este o modalitate convenabilă de a genera un șir de " +"caractere proprii din valori dinamice. Acceptă aceeași specificație de " +"format ca și `println!()`." -#: src/references/shared.md +#: src/references/strings.md:44 +#, fuzzy msgid "" -"A shared reference does not allow modifying the value it refers to, even if " -"that value was mutable. Try `*r = 'X'`." +"You can borrow `&str` slices from `String` via `&` and optionally range " +"selection. If you select a byte range that is not aligned to character " +"boundaries, the expression will panic. The `chars` iterator iterates over " +"characters and is preferred over trying to get character boundaries right." msgstr "" +"Puteți împrumuta felii `&str` de la `String` prin `&` și, opțional, prin " +"selectarea intervalului. Dacă selectați un interval de octeți care nu este " +"aliniat la limitele caracterelor, expresia va intra în panică. Iteratorul " +"`chars` iteră peste caractere și este de preferat în locul încercării de a " +"obține limite de caractere corecte." -#: src/references/shared.md +#: src/references/strings.md:49 +#, 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." +"For C++ programmers: think of `&str` as `std::string_view` from C++, but the " +"one that always points to a valid string in memory. Rust `String` is a rough " +"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 "" +"Pentru programatorii din C++: gândiți-vă la `&str` ca la `const char*` din C+" +"+, dar cel care indică întotdeauna un șir de caractere valid în memorie. " +"Rust `String` este un echivalent aproximativ al lui `std::string` din C++ " +"(principala diferență: poate conține numai octeți codificați UTF-8 și nu va " +"folosi niciodată o optimizare pentru șiruri mici)." -#: src/references/shared.md +#: src/references/strings.md:54 #, fuzzy -msgid "We will talk more about borrowing when we get to ownership." -msgstr "" -"Vom vorbi mai multe despre împrumuturi atunci când vom ajunge la proprietate." - -#: 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 "" +msgid "Byte strings literals allow you to create a `&[u8]` value directly:" +msgstr "Șirurile de octeți vă permit să creați direct o valoare `&[u8]`:" -#: src/references/exclusive.md +#: src/references/strings.md:64 msgid "" -"\"Exclusive\" means that only this reference can be used to access the " -"value. No other references (shared or exclusive) can exist at the same time, " -"and the referenced value cannot be accessed while the exclusive reference " -"exists. Try making an `&point.0` or changing `point.0` while `x_coord` is " -"alive." +"Raw strings allow you to create a `&str` value with escapes disabled: " +"`r\"\\n\" == \"\\\\n\"`. You can embed double-quotes by using an equal " +"amount of `#` on either side of the quotes:" msgstr "" +"Șirurile brute de caractere vă permit să creați o valoare `&str` având " +"caracterele speciale dezactivate: `r\"\\n\" == \"\\n\"`. Puteți încorpora " +"ghilimele duble folosind o cantitate egală de `#` de o parte și de alta a " +"lor:" -#: src/references/exclusive.md +#: src/references/exercise.md:3 #, fuzzy msgid "" -"Be sure to note the difference between `let mut x_coord: &i32` and `let " -"x_coord: &mut i32`. The first one represents a shared reference which can be " -"bound to different values, while the second represents an exclusive " -"reference to a mutable value." -msgstr "" -"Nu uitați să observați diferența dintre `let mut ref_x: &i32` și `let ref_x: " -"&mut i32`. Primul reprezintă o referință mutabilă care poate fi legată la " -"diferite valori, în timp ce al doilea reprezintă o referință la o valoare " -"mutabilă." - -#: 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 " "signatures." msgstr "" +"Vom crea câteva funcții de utilitate pentru geometria tridimensională, " +"reprezentând un punct ca `[f64;3]`. Depinde de dumneavoastră să determinați " +"semnăturile funcțiilor." -#: src/references/exercise.md +#: src/references/exercise.md:7 +#, fuzzy msgid "" "// Calculate the magnitude of a vector by summing the squares of its " "coordinates\n" @@ -4595,105 +4674,125 @@ msgid "" "square\n" "// root, like `v.sqrt()`.\n" msgstr "" +"// Calculează mărimea unui vector prin însumarea pătratelor coordonatelor " +"sale\n" +"// și luând rădăcina pătrată. Utilizați metoda `sqrt()` pentru a calcula " +"pătratul\n" +"// rădăcina pătrată, cum ar fi `v.sqrt()`.\n" -#: src/references/exercise.md +#: src/references/exercise.md:15 +#, fuzzy msgid "" "// Normalize a vector by calculating its magnitude and dividing all of its\n" "// coordinates by that magnitude.\n" msgstr "" +"// Normalizați un vector prin calcularea magnitudinii sale și împărțirea " +"tuturor vectorilor săi\n" +"// coordonate la această mărime.\n" -#: src/references/exercise.md +#: src/references/exercise.md:23 msgid "// Use the following `main` to test your work.\n" -msgstr "" +msgstr "// Folosiți următoarea funcție `main` pentru a vă testa munca.\n" -#: src/references/exercise.md src/references/solution.md +#: src/references/exercise.md:27 src/references/solution.md:22 msgid "\"Magnitude of a unit vector: {}\"" -msgstr "" +msgstr "\"Magnitudinea unui vector unitar: {}\"" -#: src/references/exercise.md src/references/solution.md +#: src/references/exercise.md:30 src/references/solution.md:25 msgid "\"Magnitude of {v:?}: {}\"" -msgstr "" +msgstr "\"Magnitudine de {v:?}: {}\"" -#: src/references/exercise.md src/references/solution.md +#: src/references/exercise.md:32 src/references/solution.md:27 msgid "\"Magnitude of {v:?} after normalization: {}\"" -msgstr "" +msgstr "\"Magnitudinea lui {v:?} după normalizare: {}\"" -#: src/references/solution.md +#: src/references/solution.md:4 msgid "/// Calculate the magnitude of the given vector.\n" -msgstr "" +msgstr "/// Calculează magnitudinea vectorului dat.\n" -#: src/references/solution.md +#: src/references/solution.md:12 msgid "" "/// Change the magnitude of the vector to 1.0 without changing its " "direction.\n" msgstr "" +"/// Modificați magnitudinea vectorului la 1.0 fără a-i schimba direcția.\n" -#: src/user-defined-types.md +#: src/user-defined-types.md:4 msgid "[Named Structs](./user-defined-types/named-structs.md) (10 minutes)" -msgstr "" +msgstr "[Structuri cu nume](./user-defined-types/named-structs.md) (10 minute)" -#: src/user-defined-types.md +#: src/user-defined-types.md:5 msgid "[Tuple Structs](./user-defined-types/tuple-structs.md) (10 minutes)" msgstr "" +"[Structuri de tuplu](./user-defined-types/tuple-structs.md) (10 minute)" -#: src/user-defined-types.md +#: src/user-defined-types.md:6 msgid "[Enums](./user-defined-types/enums.md) (5 minutes)" -msgstr "" +msgstr "[Enums](./user-defined-types/enums.md) (5 minute)" -#: src/user-defined-types.md -msgid "" -"[Static and Const](./user-defined-types/static-and-const.md) (5 minutes)" -msgstr "" +#: src/user-defined-types.md:7 +#, fuzzy +msgid "[Static](./user-defined-types/static.md) (5 minutes)" +msgstr "[Static și Const](./user-defined-types/static-and-const.md) (5 minute)" -#: src/user-defined-types.md +#: src/user-defined-types.md:8 msgid "[Type Aliases](./user-defined-types/aliases.md) (2 minutes)" -msgstr "" +msgstr "[Aliasuri de tip](./user-defined-types/aliases.md) (2 minute)" -#: src/user-defined-types.md +#: src/user-defined-types.md:9 +#, fuzzy msgid "" "[Exercise: Elevator Events](./user-defined-types/exercise.md) (15 minutes)" msgstr "" +"[Exercițiu: Evenimente de lift](./user-defined-types/exercise.md) (15 minute)" -#: src/user-defined-types/named-structs.md -#, fuzzy +#: src/user-defined-types.md:11 src/methods-and-traits.md:9 src/borrowing.md:9 +#: src/lifetimes.md:9 +msgid "This segment should take about 50 minutes" +msgstr "Acest segment ar trebui să dureze aproximativ 50 de minute" + +#: src/user-defined-types/named-structs.md:3 msgid "Like C and C++, Rust has support for custom structs:" msgstr "La fel ca în C și C++, Rust are suport pentru structuri personalizate:" -#: src/user-defined-types/named-structs.md +#: src/user-defined-types/named-structs.md:12 msgid "\"{} is {} years old\"" -msgstr "" +msgstr "\"{} are {} ani\"" -#: src/user-defined-types/named-structs.md -#: src/android/interoperability/with-c/bindgen.md +#: src/user-defined-types/named-structs.md:16 +#: src/android/interoperability/with-c/bindgen.md:87 msgid "\"Peter\"" -msgstr "" +msgstr "\"Peter\"" -#: src/user-defined-types/named-structs.md +#: src/user-defined-types/named-structs.md:22 msgid "\"Avery\"" -msgstr "" +msgstr "\"Avery\"" -#: src/user-defined-types/named-structs.md +#: src/user-defined-types/named-structs.md:27 msgid "\"Jackie\"" -msgstr "" +msgstr "\"Jackie\"" -#: src/user-defined-types/named-structs.md -#, fuzzy +#: src/user-defined-types/named-structs.md:35 +#: src/user-defined-types/enums.md:29 src/pattern-matching/match.md:38 +#: src/methods-and-traits/methods.md:69 +msgid "Key Points:" +msgstr "Puncte-cheie:" + +#: src/user-defined-types/named-structs.md:37 msgid "Structs work like in C or C++." msgstr "Structurile funcționează ca în C sau C++." -#: src/user-defined-types/named-structs.md -#, fuzzy +#: src/user-defined-types/named-structs.md:38 msgid "Like in C++, and unlike in C, no typedef is needed to define a type." msgstr "" "La fel ca în C++ și spre deosebire de C, nu este nevoie de un typedef pentru " "a defini un tip." -#: src/user-defined-types/named-structs.md -#, fuzzy +#: src/user-defined-types/named-structs.md:39 msgid "Unlike in C++, there is no inheritance between structs." msgstr "Spre deosebire de C++, nu există moștenire între structuri." -#: src/user-defined-types/named-structs.md +#: src/user-defined-types/named-structs.md:40 #, fuzzy msgid "" "This may be a good time to let people know there are different types of " @@ -4702,7 +4801,7 @@ msgstr "" "Acesta ar putea fi un moment bun pentru a informa oamenii că există diferite " "tipuri de structuri." -#: src/user-defined-types/named-structs.md +#: src/user-defined-types/named-structs.md:42 #, fuzzy msgid "" "Zero-sized structs (e.g. `struct Foo;`) might be used when implementing a " @@ -4713,7 +4812,7 @@ msgstr "" "atunci când se implementează o trăsătură pe un anumit tip, dar nu aveți date " "pe care doriți să le stocați în valoarea în sine." -#: src/user-defined-types/named-structs.md +#: src/user-defined-types/named-structs.md:45 #, fuzzy msgid "" "The next slide will introduce Tuple structs, used when the field names are " @@ -4722,7 +4821,7 @@ msgstr "" "Următorul diapozitiv va prezenta structurile Tuple, utilizate atunci când " "numele câmpurilor nu sunt importante." -#: src/user-defined-types/named-structs.md +#: src/user-defined-types/named-structs.md:47 #, fuzzy msgid "" "If you already have variables with the right names, then you can create the " @@ -4731,7 +4830,7 @@ msgstr "" "Dacă aveți deja variabile cu numele corecte, puteți crea structura folosind " "o prescurtare:" -#: src/user-defined-types/named-structs.md +#: src/user-defined-types/named-structs.md:49 #, fuzzy msgid "" "The syntax `..avery` allows us to copy the majority of the fields from the " @@ -4742,36 +4841,36 @@ msgstr "" "structură fără a fi nevoie să le scriem în mod explicit pe toate. Acesta " "trebuie să fie întotdeauna ultimul element." -#: src/user-defined-types/tuple-structs.md +#: src/user-defined-types/tuple-structs.md:7 #, fuzzy msgid "If the field names are unimportant, you can use a tuple struct:" msgstr "" "În cazul în care numele câmpurilor nu sunt importante, puteți utiliza o " "structură de tip tuple:" -#: src/user-defined-types/tuple-structs.md +#: src/user-defined-types/tuple-structs.md:14 msgid "\"({}, {})\"" -msgstr "" +msgstr "\"({}, {})\"" -#: src/user-defined-types/tuple-structs.md +#: src/user-defined-types/tuple-structs.md:18 #, fuzzy msgid "This is often used for single-field wrappers (called newtypes):" msgstr "" "Acest lucru este adesea utilizat pentru învelișurile cu un singur câmp " "(denumite newtypes):" -#: src/user-defined-types/tuple-structs.md +#: src/user-defined-types/tuple-structs.md:25 msgid "\"Ask a rocket scientist at NASA\"" -msgstr "" +msgstr "\"Întrebați un specialist în rachete de la NASA\"" -#: 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/user-defined-types/tuple-structs.md:29 +#: src/android/interoperability/cpp/cpp-bridge.md:50 +#: src/bare-metal/microcontrollers/type-state.md:14 +#: src/async/pitfalls/cancellation.md:98 src/async/pitfalls/cancellation.md:101 msgid "// ...\n" -msgstr "" +msgstr "// ...\n" -#: src/user-defined-types/tuple-structs.md +#: src/user-defined-types/tuple-structs.md:41 #, fuzzy msgid "" "Newtypes are a great way to encode additional information about the value in " @@ -4780,13 +4879,13 @@ msgstr "" "Newtypes reprezintă o modalitate excelentă de a codifica informații " "suplimentare despre valoarea unui tip primitiv, de exemplu:" -#: src/user-defined-types/tuple-structs.md +#: src/user-defined-types/tuple-structs.md:43 #, fuzzy msgid "The number is measured in some units: `Newtons` in the example above." msgstr "" "Numărul este măsurat în anumite unități: `Newtons` în exemplul de mai sus." -#: src/user-defined-types/tuple-structs.md +#: src/user-defined-types/tuple-structs.md:44 #, fuzzy msgid "" "The value passed some validation when it was created, so you no longer have " @@ -4796,7 +4895,7 @@ msgstr "" "nu mai trebuie să o validați din nou la fiecare utilizare: " "`PhoneNumber(String)` sau `OddNumber(u32)`." -#: src/user-defined-types/tuple-structs.md +#: src/user-defined-types/tuple-structs.md:47 #, fuzzy msgid "" "Demonstrate how to add a `f64` value to a `Newtons` type by accessing the " @@ -4805,7 +4904,7 @@ msgstr "" "Demonstrați cum să adăugați o valoare `f64` la un tip `Newtons` prin " "accesarea unui singur câmp din noul tip." -#: src/user-defined-types/tuple-structs.md +#: src/user-defined-types/tuple-structs.md:49 #, fuzzy msgid "" "Rust generally doesn’t like inexplicit things, like automatic unwrapping or " @@ -4814,12 +4913,11 @@ msgstr "" "În general, Rust nu agreează lucrurile inexplicabile, cum ar fi desfacerea " "automată sau, de exemplu, utilizarea booleenilor ca numere întregi." -#: src/user-defined-types/tuple-structs.md -#, fuzzy +#: src/user-defined-types/tuple-structs.md:51 msgid "Operator overloading is discussed on Day 3 (generics)." msgstr "Supraîncărcarea operatorilor este discutată în ziua 3 (generice)." -#: src/user-defined-types/tuple-structs.md +#: src/user-defined-types/tuple-structs.md:52 #, fuzzy msgid "" "The example is a subtle reference to the [Mars Climate Orbiter](https://en." @@ -4828,8 +4926,7 @@ msgstr "" "Exemplul este o referire subtilă la eșecul [Mars Climate Orbiter] (https://" "en.wikipedia.org/wiki/Mars_Climate_Orbiter)." -#: src/user-defined-types/enums.md -#, fuzzy +#: src/user-defined-types/enums.md:3 msgid "" "The `enum` keyword allows the creation of a type which has a few different " "variants:" @@ -4837,57 +4934,65 @@ msgstr "" "Cuvântul cheie `enum` permite crearea unui tip care are câteva variante " "diferite:" -#: src/user-defined-types/enums.md +#: src/user-defined-types/enums.md:15 msgid "// Simple variant\n" -msgstr "" +msgstr "// Variantă simplă\n" -#: src/user-defined-types/enums.md +#: src/user-defined-types/enums.md:16 msgid "// Tuple variant\n" -msgstr "" +msgstr "// Varianta cu tupluri\n" -#: src/user-defined-types/enums.md +#: src/user-defined-types/enums.md:17 +#, fuzzy msgid "// Struct variant\n" -msgstr "" +msgstr "// Variantă de structură\n" -#: src/user-defined-types/enums.md +#: src/user-defined-types/enums.md:22 msgid "\"On this turn: {:?}\"" -msgstr "" +msgstr "\"În acest tur: {:?}\"" -#: src/user-defined-types/enums.md +#: src/user-defined-types/enums.md:31 #, fuzzy msgid "Enumerations allow you to collect a set of values under one type." -msgstr "Enumerările vă permit să colectați un set de valori sub un singur tip" +msgstr "Enumerările vă permit să colectați un set de valori sub un singur tip." -#: src/user-defined-types/enums.md +#: src/user-defined-types/enums.md:32 +#, fuzzy msgid "" "`Direction` is a type with variants. There are two values of `Direction`: " "`Direction::Left` and `Direction::Right`." msgstr "" +"`Direction` este un tip cu variante. Există două valori pentru `Direction`: " +"`Direction::Left` și `Direction::Right`." -#: src/user-defined-types/enums.md +#: src/user-defined-types/enums.md:34 +#, fuzzy msgid "" "`PlayerMove` is a type with three variants. In addition to the payloads, " "Rust will store a discriminant so that it knows at runtime which variant is " "in a `PlayerMove` value." msgstr "" +"`PlayerMove` este un tip cu trei variante. În plus față de sarcinile utile, " +"Rust va stoca un discriminant, astfel încât să știe la momentul execuției ce " +"variantă se află într-o valoare `PlayerMove`." -#: src/user-defined-types/enums.md +#: src/user-defined-types/enums.md:37 #, fuzzy msgid "This might be a good time to compare structs and enums:" msgstr "" "Acesta ar putea fi un moment bun pentru a compara structurile și " "enumerațiile:" -#: src/user-defined-types/enums.md +#: src/user-defined-types/enums.md:38 #, fuzzy msgid "" "In both, you can have a simple version without fields (unit struct) or one " "with different types of fields (variant payloads)." msgstr "" "În ambele, puteți avea o versiune simplă fără câmpuri (unit struct) sau una " -"cu diferite tipuri de câmpuri (varianta payloads)." +"cu diferite tipuri de câmpuri (varianta payloads). " -#: src/user-defined-types/enums.md +#: src/user-defined-types/enums.md:40 #, fuzzy msgid "" "You could even implement the different variants of an enum with separate " @@ -4898,48 +5003,53 @@ msgstr "" "structuri separate, dar atunci acestea nu ar fi de același tip ca în cazul " "în care ar fi definite toate într-un enum." -#: src/user-defined-types/enums.md +#: src/user-defined-types/enums.md:43 +#, fuzzy msgid "Rust uses minimal space to store the discriminant." -msgstr "" +msgstr "Rust utilizează un spațiu minim pentru a stoca discriminantul." -#: src/user-defined-types/enums.md +#: src/user-defined-types/enums.md:44 +#, fuzzy msgid "If necessary, it stores an integer of the smallest required size" msgstr "" +"Dacă este necesar, se stochează un număr întreg de cea mai mică dimensiune " +"necesară" -#: src/user-defined-types/enums.md +#: src/user-defined-types/enums.md:45 +#, fuzzy msgid "" "If the allowed variant values do not cover all bit patterns, it will use " "invalid bit patterns to encode the discriminant (the \"niche " "optimization\"). For example, `Option<&u8>` stores either a pointer to an " "integer or `NULL` for the `None` variant." msgstr "" +"În cazul în care valorile variantelor permise nu acoperă toate modelele de " +"biți, se vor utiliza modele de biți nevalabile pentru a codifica " +"discriminantul (\"optimizarea nișei\"). De exemplu, `Option<&u8>` stochează " +"fie un pointer la un întreg, fie `NULL` pentru varianta `None`." -#: src/user-defined-types/enums.md -#, fuzzy +#: src/user-defined-types/enums.md:49 msgid "" "You can control the discriminant if needed (e.g., for compatibility with C):" msgstr "" "Puteți controla discriminantul dacă este necesar (de exemplu, pentru " "compatibilitate cu C):" -#: src/user-defined-types/enums.md -#, fuzzy +#: src/user-defined-types/enums.md:67 msgid "" "Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 " "bytes." msgstr "" "Fără `repr`, tipul de discriminant are nevoie de 2 octeți, deoarece 10001 se " -"potrivește cu 2 octeți." +"reprezintă cu 2 octeți." -#: src/user-defined-types/enums.md src/user-defined-types/static-and-const.md -#: src/memory-management/review.md src/memory-management/move.md -#: src/smart-pointers/box.md src/borrowing/shared.md -#, fuzzy +#: src/user-defined-types/enums.md:70 src/user-defined-types/static.md:27 +#: src/memory-management/review.md:51 src/memory-management/move.md:100 +#: src/smart-pointers/box.md:85 src/borrowing/shared.md:33 msgid "More to Explore" msgstr "Mai multe de explorat" -#: src/user-defined-types/enums.md -#, fuzzy +#: src/user-defined-types/enums.md:72 msgid "" "Rust has several optimizations it can employ to make enums take up less " "space." @@ -4947,96 +5057,47 @@ msgstr "" "Rust are mai multe optimizări pe care le poate folosi pentru ca enumerațiile " "să ocupe mai puțin spațiu." -#: src/user-defined-types/enums.md -#, fuzzy +#: src/user-defined-types/enums.md:74 msgid "" "Null pointer optimization: For [some types](https://doc.rust-lang.org/std/" "option/#representation), Rust guarantees that `size_of::()` equals " "`size_of::>()`." msgstr "" -"Optimizarea pointerului nul: Pentru [unele tipuri](https://doc.rust-lang.org/" -"std/option/#representation), Rust garantează că `size_of::()` este egal " -"cu `size_of::<Opțiune>()`." +"Optimizarea pointerilor nuli: Pentru [unele tipuri](https://doc.rust-lang." +"org/std/option/#representation) Rust garantează că `size_of::()` este " +"egal cu `size_of::<Opțiune>()`." -#: src/user-defined-types/enums.md -#, fuzzy +#: src/user-defined-types/enums.md:78 msgid "" "Example code if you want to show how the bitwise representation _may_ look " "like in practice. It's important to note that the compiler provides no " "guarantees regarding this representation, therefore this is totally unsafe." msgstr "" -"Exemplu de cod dacă doriți să arătați cum ar putea arăta în practică " -"reprezentarea pe biți. Este important de reținut că compilatorul nu oferă " -"nicio garanție în ceea ce privește această reprezentare, prin urmare este " -"total nesigură." - -#: src/user-defined-types/static-and-const.md -#, fuzzy -msgid "" -"Static and constant variables are two different ways to create globally-" -"scoped values that cannot be moved or reallocated during the execution of " -"the program." -msgstr "" -"Variabilele statice și variabilele constante sunt două modalități diferite " -"de a crea valori cu acoperire globală care nu pot fi mutate sau realocate în " -"timpul execuției programului." - -#: src/user-defined-types/static-and-const.md -#, fuzzy -msgid "`const`" -msgstr "`const`" - -#: src/user-defined-types/static-and-const.md -#, fuzzy -msgid "" -"Constant variables are evaluated at compile time and their values are " -"inlined wherever they are used:" -msgstr "" -"Variabilele constante sunt evaluate la compilare, iar valorile lor sunt " -"subliniate ori de câte ori sunt utilizate:" - -#: src/user-defined-types/static-and-const.md -#, fuzzy -msgid "" -"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-" -"vs-static.html) these are inlined upon use." -msgstr "" -"În conformitate cu [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-" -"const-vs-static.html), acestea sunt subliniate la utilizare." - -#: src/user-defined-types/static-and-const.md -#, fuzzy -msgid "" -"Only functions marked `const` can be called at compile time to generate " -"`const` values. `const` functions can however be called at runtime." -msgstr "" -"Numai funcțiile marcate `const` pot fi apelate la compilare pentru a genera " -"valori `const`. totuși, funcțiile `const` pot fi apelate în timpul execuției." +"Exemplu de cod pentru a putea arăta în practică reprezentarea pe biți. " +"Compilatorul nu oferă nicio garanție în ceea ce privește această " +"reprezentare, prin urmare este total nesigură." -#: src/user-defined-types/static-and-const.md -#, fuzzy +#: src/user-defined-types/static.md:1 msgid "`static`" -msgstr "`static`" +msgstr "‘Static’" -#: src/user-defined-types/static-and-const.md -#, fuzzy +#: src/user-defined-types/static.md:3 msgid "" "Static variables will live during the whole execution of the program, and " "therefore will not move:" msgstr "" "Variabilele statice vor fi valabile pe toată durata execuției programului " -"și, prin urmare, nu se vor deplasa:" +"și, prin urmare, nu se vor muta:" -#: src/user-defined-types/static-and-const.md -#, fuzzy +#: src/user-defined-types/static.md:7 msgid "\"Welcome to RustOS 3.14\"" -msgstr "Bine ați venit la Ziua 1" +msgstr "“RustOS 3.14 vă salută”" -#: src/user-defined-types/static-and-const.md +#: src/user-defined-types/static.md:10 msgid "\"{BANNER}\"" -msgstr "" +msgstr "\"{BANNER}\"" -#: src/user-defined-types/static-and-const.md +#: src/user-defined-types/static.md:14 #, fuzzy msgid "" "As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-" @@ -5047,31 +5108,21 @@ msgid "" "`const` is generally preferred." msgstr "" "După cum se menționează în [Rust RFC Book](https://rust-lang.github.io/" -"rfcs/0246-const-vs-static.html), acestea nu sunt subliniate la utilizare și " -"au o locație de memorie reală asociată. Acest lucru este util pentru codul " -"nesigur și încorporat, iar variabila trăiește pe toată durata execuției " -"programului. Atunci când o valoare cu acoperire globală nu are un motiv " -"pentru a avea nevoie de identitatea obiectului, `const` este în general " -"preferată." - -#: src/user-defined-types/static-and-const.md -#, fuzzy -msgid "Mention that `const` behaves semantically similar to C++'s `constexpr`." -msgstr "" -"Menționați că `const` are un comportament semantic similar cu `constexpr` " -"din C++." +"rfcs/0246-const-vs-static.html), acestea nu sunt incluse în cod la utilizare " +"și au o locație de memorie reală asociată. Acest lucru este util pentru " +"codul nesigur și care ruleaza direct pe device (embedded) , iar variabila " +"există pe toată durata execuției programului. Atunci când o valoare cu " +"acoperire globală nu are nevoie de identitatea obiectului, `const` este în " +"general preferat." -#: src/user-defined-types/static-and-const.md +#: src/user-defined-types/static.md:23 #, fuzzy -msgid "" -"`static`, on the other hand, is much more similar to a `const` or mutable " -"global variable in C++." +msgid "`static` is similar to mutable global variables in C++." msgstr "" -"`static`, pe de altă parte, este mult mai asemănătoare cu o variabilă " -"globală `const` sau mutabilă în C++." +"`static`, pe de altă parte, este mult mai asemănătoar cu o variabilă globală " +"`const` sau mutabilă în C++." -#: src/user-defined-types/static-and-const.md -#, fuzzy +#: src/user-defined-types/static.md:24 msgid "" "`static` provides object identity: an address in memory and state as " "required by types with interior mutability such as `Mutex`." @@ -5079,79 +5130,7 @@ msgstr "" "`static` asigură identitatea obiectului: o adresă în memorie și starea " "necesară pentru tipurile cu mutabilitate interioară, cum ar fi `Mutex`." -#: src/user-defined-types/static-and-const.md -#, fuzzy -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 "" -"Nu este foarte des întâlnit cazul în care cineva ar avea nevoie de o " -"constantă evaluată în timp de execuție, dar este utilă și mai sigură decât " -"utilizarea unei constante statice." - -#: src/user-defined-types/static-and-const.md -msgid "Properties table:" -msgstr "Tabelul cu proprietăți:" - -#: src/user-defined-types/static-and-const.md -#: src/chromium/adding-third-party-crates.md -msgid "Property" -msgstr "Proprietate" - -#: src/user-defined-types/static-and-const.md -msgid "Static" -msgstr "Static" - -#: src/user-defined-types/static-and-const.md -msgid "Constant" -msgstr "Constant" - -#: src/user-defined-types/static-and-const.md -msgid "Has an address in memory" -msgstr "Are o adresă în memorie" - -#: src/user-defined-types/static-and-const.md -#: src/chromium/adding-third-party-crates/resolving-problems.md -msgid "Yes" -msgstr "Da" - -#: src/user-defined-types/static-and-const.md -#, fuzzy -msgid "No (inlined)" -msgstr "Nu (subliniat)" - -#: src/user-defined-types/static-and-const.md -#, fuzzy -msgid "Lives for the entire duration of the program" -msgstr "Trăiește pe întreaga durată a programului" - -#: src/user-defined-types/static-and-const.md -#: src/chromium/adding-third-party-crates/resolving-problems.md -msgid "No" -msgstr "Nu" - -#: src/user-defined-types/static-and-const.md -msgid "Can be mutable" -msgstr "Poate fi mutabil" - -#: src/user-defined-types/static-and-const.md -msgid "Yes (unsafe)" -msgstr "Da (nesigur)" - -#: src/user-defined-types/static-and-const.md -msgid "Evaluated at compile time" -msgstr "Evaluat la compilare" - -#: src/user-defined-types/static-and-const.md -msgid "Yes (initialised at compile time)" -msgstr "Da (inițializat la compilare)" - -#: src/user-defined-types/static-and-const.md -#, fuzzy -msgid "Inlined wherever it is used" -msgstr "Încărcat oriunde este utilizat" - -#: src/user-defined-types/static-and-const.md +#: src/user-defined-types/static.md:29 #, fuzzy msgid "" "Because `static` variables are accessible from any thread, they must be " @@ -5166,139 +5145,223 @@ msgstr "" "orice acces la ele necesită cod `unsafe`. Ne vom uita la [mutable statics]" "(../unsafe/mutable-static-variables.md) în capitolul despre Unsafe Rust." -#: src/user-defined-types/static-and-const.md +#: src/user-defined-types/static.md:34 #, fuzzy msgid "Thread-local data can be created with the macro `std::thread_local`." msgstr "" -"datele `thread_local` pot fi create cu ajutorul macroului `std::" +"Datele `thread_local` pot fi create cu ajutorul macroului `std::" "thread_local`." -#: src/user-defined-types/aliases.md +#: src/user-defined-types/const.md:1 +msgid "`const`" +msgstr "`const`" + +#: src/user-defined-types/const.md:3 +#, fuzzy +msgid "" +"Constants are evaluated at compile time and their values are inlined " +"wherever they are used:" +msgstr "" +"Variabilele constante sunt evaluate la compilare, iar valorile lor sunt " +"înlocuite în cod ori de câte ori sunt utilizate:" + +#: src/user-defined-types/const.md:26 +msgid "" +"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-" +"vs-static.html) these are inlined upon use." +msgstr "" +"În conformitate cu [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-" +"const-vs-static.html), acestea sunt înlocuite în cod la utilizare." + +#: src/user-defined-types/const.md:28 +msgid "" +"Only functions marked `const` can be called at compile time to generate " +"`const` values. `const` functions can however be called at runtime." +msgstr "" +"Numai funcțiile marcate `const` pot fi apelate la compilare pentru a genera " +"valori `const`. Funcțiile `const` totuși pot fi apelate în timpul execuției." + +#: src/user-defined-types/const.md:33 +#, fuzzy +msgid "Mention that `const` behaves semantically similar to C++'s `constexpr`" +msgstr "" +"Menționați faptul că în Rust `const` are un comportament semantic similar cu " +"`constexpr` din C++." + +#: src/user-defined-types/const.md:34 +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 "" +"Nu este foarte des întâlnit cazul în care cineva ar avea nevoie de o " +"constantă evaluată în timp de execuție, dar este utilă și mai sigură decât " +"utilizarea unei constante statice." + +#: src/user-defined-types/aliases.md:3 +#, fuzzy msgid "" "A type alias creates a name for another type. The two types can be used " "interchangeably." msgstr "" +"Un alias de tip creează un nume pentru un alt tip. Cele două tipuri pot fi " +"utilizate în mod interschimbabil." -#: src/user-defined-types/aliases.md +#: src/user-defined-types/aliases.md:13 +#, fuzzy msgid "// Aliases are more useful with long, complex types:\n" -msgstr "" +msgstr "// Aliasurile sunt mai utile în cazul tipurilor lungi și complexe:\n" -#: src/user-defined-types/aliases.md +#: src/user-defined-types/aliases.md:23 +#, fuzzy msgid "C programmers will recognize this as similar to a `typedef`." msgstr "" +"Programatorii C vor recunoaște acest lucru ca fiind similar cu un `typedef`." -#: src/user-defined-types/exercise.md +#: src/user-defined-types/exercise.md:3 +#, fuzzy msgid "" "We will create a data structure to represent an event in an elevator control " "system. It is up to you to define the types and functions to construct " "various events. Use `#[derive(Debug)]` to allow the types to be formatted " "with `{:?}`." msgstr "" +"Vom crea o structură de date pentru a reprezenta un eveniment într-un sistem " +"de control al ascensorului. Depinde de dumneavoastră să definiți tipurile și " +"funcțiile pentru a construi diverse evenimente. Utilizați `#[derive(Debug)]` " +"pentru a permite formatarea tipurilor cu `{:?}`." -#: src/user-defined-types/exercise.md +#: src/user-defined-types/exercise.md:7 +#, fuzzy msgid "" "This exercise only requires creating and populating data structures so that " "`main` runs without errors. The next part of the course will cover getting " "data out of these structures." msgstr "" +"Acest exercițiu necesită doar crearea și popularea structurilor de date " +"astfel încât `main` să ruleze fără erori. Următoarea parte a cursului se va " +"ocupa de extragerea datelor din aceste structuri." -#: src/user-defined-types/exercise.md src/user-defined-types/solution.md +#: src/user-defined-types/exercise.md:12 src/user-defined-types/solution.md:4 +#, fuzzy msgid "" "/// An event in the elevator system that the controller must react to.\n" msgstr "" +"/// Un eveniment din sistemul de ascensoare la care trebuie să reacționeze " +"controlerul.\n" -#: src/user-defined-types/exercise.md +#: src/user-defined-types/exercise.md:15 +#, fuzzy msgid "// TODO: add required variants\n" -msgstr "" +msgstr "// TODO: adăugați variantele necesare\n" -#: src/user-defined-types/exercise.md src/user-defined-types/solution.md +#: src/user-defined-types/exercise.md:17 src/user-defined-types/solution.md:22 +#, fuzzy msgid "/// A direction of travel.\n" -msgstr "" +msgstr "/// O direcție de deplasare.\n" -#: src/user-defined-types/exercise.md src/user-defined-types/solution.md +#: src/user-defined-types/exercise.md:24 src/user-defined-types/solution.md:39 +#, fuzzy msgid "/// The car has arrived on the given floor.\n" -msgstr "" +msgstr "/// Mașina a ajuns la etajul dat.\n" -#: src/user-defined-types/exercise.md src/user-defined-types/solution.md +#: src/user-defined-types/exercise.md:29 src/user-defined-types/solution.md:44 +#, fuzzy msgid "/// The car doors have opened.\n" -msgstr "" +msgstr "/// Portierele mașinii s-au deschis.\n" -#: src/user-defined-types/exercise.md src/user-defined-types/solution.md +#: src/user-defined-types/exercise.md:34 src/user-defined-types/solution.md:49 +#, fuzzy msgid "/// The car doors have closed.\n" -msgstr "" +msgstr "/// Ușile mașinii s-au închis.\n" -#: src/user-defined-types/exercise.md src/user-defined-types/solution.md +#: src/user-defined-types/exercise.md:39 src/user-defined-types/solution.md:54 +#, fuzzy msgid "" "/// A directional button was pressed in an elevator lobby on the given " "floor.\n" msgstr "" +"/// Un buton direcțional a fost apăsat în holul liftului de la etajul dat.\n" -#: src/user-defined-types/exercise.md src/user-defined-types/solution.md +#: src/user-defined-types/exercise.md:44 src/user-defined-types/solution.md:59 +#, fuzzy msgid "/// A floor button was pressed in the elevator car.\n" -msgstr "" +msgstr "/// Un buton de podea a fost apăsat în cabina liftului.\n" -#: src/user-defined-types/exercise.md src/user-defined-types/solution.md +#: src/user-defined-types/exercise.md:52 src/user-defined-types/solution.md:67 +#, fuzzy msgid "\"A ground floor passenger has pressed the up button: {:?}\"" -msgstr "" +msgstr "\"Un pasager de la parter a apăsat butonul de urcare: {:?}\"" -#: src/user-defined-types/exercise.md src/user-defined-types/solution.md +#: src/user-defined-types/exercise.md:55 src/user-defined-types/solution.md:70 +#, fuzzy msgid "\"The car has arrived on the ground floor: {:?}\"" -msgstr "" +msgstr "\"Mașina a ajuns la parter: {:?}\"" -#: src/user-defined-types/exercise.md src/user-defined-types/solution.md +#: src/user-defined-types/exercise.md:56 src/user-defined-types/solution.md:71 +#, fuzzy msgid "\"The car door opened: {:?}\"" -msgstr "" +msgstr "\"S-a deschis portiera mașinii: {:?}\"" -#: src/user-defined-types/exercise.md src/user-defined-types/solution.md +#: src/user-defined-types/exercise.md:58 src/user-defined-types/solution.md:73 +#, fuzzy msgid "\"A passenger has pressed the 3rd floor button: {:?}\"" -msgstr "" +msgstr "\"Un pasager a apăsat butonul de la etajul 3: {:?}\"" -#: src/user-defined-types/exercise.md src/user-defined-types/solution.md +#: src/user-defined-types/exercise.md:61 src/user-defined-types/solution.md:76 +#, fuzzy msgid "\"The car door closed: {:?}\"" -msgstr "" +msgstr "\"Ușa mașinii s-a închis: {:?}\"" -#: src/user-defined-types/exercise.md src/user-defined-types/solution.md +#: src/user-defined-types/exercise.md:62 src/user-defined-types/solution.md:77 +#, fuzzy msgid "\"The car has arrived on the 3rd floor: {:?}\"" -msgstr "" +msgstr "\"Mașina a ajuns la etajul 3: {:?}\"" -#: src/user-defined-types/solution.md +#: src/user-defined-types/solution.md:7 +#, fuzzy msgid "/// A button was pressed.\n" -msgstr "" +msgstr "/// A fost apăsat un buton.\n" -#: src/user-defined-types/solution.md +#: src/user-defined-types/solution.md:10 +#, fuzzy msgid "/// The car has arrived at the given floor.\n" -msgstr "" +msgstr "/// Mașina a ajuns la etajul dat.\n" -#: src/user-defined-types/solution.md +#: src/user-defined-types/solution.md:13 +#, fuzzy msgid "/// The car's doors have opened.\n" -msgstr "" +msgstr "/// Portierele mașinii s-au deschis.\n" -#: src/user-defined-types/solution.md +#: src/user-defined-types/solution.md:16 +#, fuzzy msgid "/// The car's doors have closed.\n" -msgstr "" +msgstr "/// Portierele mașinii s-au închis.\n" -#: src/user-defined-types/solution.md +#: src/user-defined-types/solution.md:19 +#, fuzzy msgid "/// A floor is represented as an integer.\n" -msgstr "" +msgstr "/// Un etaj este reprezentat ca un număr întreg.\n" -#: src/user-defined-types/solution.md +#: src/user-defined-types/solution.md:29 +#, fuzzy msgid "/// A user-accessible button.\n" -msgstr "" +msgstr "/// Un buton accesibil utilizatorului.\n" -#: src/user-defined-types/solution.md +#: src/user-defined-types/solution.md:33 +#, fuzzy msgid "/// A button in the elevator lobby on the given floor.\n" -msgstr "" +msgstr "/// Un buton în holul liftului de la etajul dat.\n" -#: src/user-defined-types/solution.md +#: src/user-defined-types/solution.md:36 +#, fuzzy msgid "/// A floor button within the car.\n" -msgstr "" +msgstr "/// Un buton de podea în interiorul mașinii.\n" -#: src/welcome-day-2.md -#, fuzzy +#: src/welcome-day-2.md:1 msgid "Welcome to Day 2" -msgstr "Bine ați venit în ziua 2" +msgstr "Bine ați venit în ziua a doua" -#: src/welcome-day-2.md +#: src/welcome-day-2.md:3 #, fuzzy msgid "" "Now that we have seen a fair amount of Rust, today will focus on Rust's type " @@ -5306,170 +5369,364 @@ msgid "" msgstr "" "Acum, că am văzut o cantitate destul de mare de rugină, vom continua cu:" -#: src/welcome-day-2.md +#: src/welcome-day-2.md:6 #, fuzzy msgid "Pattern matching: extracting data from structures." msgstr "" "Găsirea de tipare: destructurarea enumerațiilor, structurilor și a " "tablourilor." -#: src/welcome-day-2.md +#: src/welcome-day-2.md:7 +#, fuzzy msgid "Methods: associating functions with types." -msgstr "" +msgstr "Metode: asocierea funcțiilor cu tipurile." -#: src/welcome-day-2.md +#: src/welcome-day-2.md:8 +#, fuzzy msgid "Traits: behaviors shared by multiple types." -msgstr "" +msgstr "Trăsături: comportamente împărtășite de mai multe tipuri." -#: src/welcome-day-2.md +#: src/welcome-day-2.md:9 +#, fuzzy msgid "Generics: parameterizing types on other types." -msgstr "" +msgstr "Generice: parametrizarea tipurilor pe alte tipuri." -#: src/welcome-day-2.md +#: src/welcome-day-2.md:10 +#, fuzzy msgid "" "Standard library types and traits: a tour of Rust's rich standard library." msgstr "" +"Tipuri și trăsături ale bibliotecii standard: un tur al bogatei biblioteci " +"standard Rust." -#: src/welcome-day-2.md +#: src/welcome-day-2.md:15 +#, fuzzy msgid "[Welcome](./welcome-day-2.md) (3 minutes)" -msgstr "" +msgstr "[Introducere](../welcome-day-2.md) (3 minute)" -#: src/welcome-day-2.md +#: src/welcome-day-2.md:16 #, fuzzy -msgid "[Pattern Matching](./pattern-matching.md) (50 minutes)" -msgstr "" -"Consultați [pattern matching](../pattern-matching.md) pentru mai multe " -"detalii despre tipare în Rust." +msgid "[Pattern Matching](./pattern-matching.md) (1 hour)" +msgstr "[Potrivirea șabloanelor](../pattern-matching.md) (50 minute)" -#: src/welcome-day-2.md -msgid "[Methods and Traits](./methods-and-traits.md) (55 minutes)" -msgstr "" +#: src/welcome-day-2.md:17 +#, fuzzy +msgid "[Methods and Traits](./methods-and-traits.md) (50 minutes)" +msgstr "[Metode și trăsături](./methods-and-traits.md) (55 minute)" -#: src/welcome-day-2.md -msgid "[Generics](./generics.md) (45 minutes)" -msgstr "" +#: src/welcome-day-2.md:18 +#, fuzzy +msgid "[Generics](./generics.md) (40 minutes)" +msgstr "[Generice](../generics.md) (45 minute)" -#: src/welcome-day-2.md src/welcome-day-4.md +#: src/welcome-day-2.md:20 msgid "" -"Including 10 minute breaks, this session should take about 3 hours and 5 " +"Including 10 minute breaks, this session should take about 2 hours and 55 " "minutes" msgstr "" +"Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze " +"aproximativ 2 ore și 55 de minute" + +#: src/pattern-matching.md:4 +#, fuzzy +msgid "[Matching Values](./pattern-matching/match.md) (10 minutes)" +msgstr "[Potrivirea șabloanelor](../pattern-matching.md) (50 minute)" -#: src/pattern-matching.md +#: src/pattern-matching.md:5 +#, fuzzy msgid "[Destructuring](./pattern-matching/destructuring.md) (10 minutes)" -msgstr "" +msgstr "[Destructurare](./pattern-matching/destructuring.md) (10 minute)" -#: src/pattern-matching.md +#: src/pattern-matching.md:6 +#, fuzzy msgid "[Let Control Flow](./pattern-matching/let-control-flow.md) (10 minutes)" msgstr "" +"[Lasă controlul să curgă](./pattern-matching/let-control-flow.md) (10 minute)" -#: src/pattern-matching.md +#: src/pattern-matching.md:7 +#, fuzzy msgid "" "[Exercise: Expression Evaluation](./pattern-matching/exercise.md) (30 " "minutes)" msgstr "" +"[Exercițiu: Evaluarea expresiilor](./pattern-matching/exercise.md) (30 " +"minute)" -#: src/pattern-matching/destructuring.md -msgid "Like tuples, structs and enums can also be destructured by matching:" -msgstr "" - -#: src/pattern-matching/destructuring.md -msgid "Structs" -msgstr "Structuri" +#: src/pattern-matching.md:9 src/memory-management.md:13 +msgid "This segment should take about 1 hour" +msgstr "Acest segment ar trebui să dureze aproximativ 1 oră" -#: src/pattern-matching/destructuring.md -msgid "\"x.0 = 1, b = {b}, y = {y}\"" +#: src/pattern-matching/match.md:3 +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." msgstr "" +"Cuvântul cheie `match` vă permite să comparați o valoare cu unul sau mai " +"multe _șabloane_. Comparațiile se fac de sus în jos, iar prima potrivire " +"câștigă." -#: src/pattern-matching/destructuring.md -msgid "\"y = 2, x = {i:?}\"" -msgstr "" +#: src/pattern-matching/match.md:6 +msgid "The patterns can be simple values, similarly to `switch` in C and C++:" +msgstr "Modelele pot fi valori simple, la fel ca `switch` în C și C++:" -#: src/pattern-matching/destructuring.md -msgid "\"y = {y}, other fields were ignored\"" -msgstr "" +#: src/pattern-matching/match.md:11 +msgid "'x'" +msgstr "‘x’" + +#: src/pattern-matching/match.md:13 +msgid "'q'" +msgstr "'q'" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/match.md:13 #, fuzzy -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 "" -"Modelele pot fi, de asemenea, utilizate pentru a lega variabilele de părți " -"ale valorilor dumneavoastră. În acest fel puteți inspecta structura " -"tipurilor dumneavoastră. Să începem cu un tip simplu `enum`:" +msgid "\"Quitting\"" +msgstr "\"Renunțarea\"" -#: src/pattern-matching/destructuring.md -msgid "\"cannot divide {n} into two equal parts\"" -msgstr "" +#: src/pattern-matching/match.md:14 src/generics/exercise.md:15 +#: src/generics/solution.md:17 src/std-traits/solution.md:16 +#: src/error-handling/exercise.md:62 src/error-handling/exercise.md:64 +#: src/error-handling/solution.md:62 src/error-handling/solution.md:64 +msgid "'a'" +msgstr "'a'" -#: src/pattern-matching/destructuring.md -msgid "\"{n} divided in two is {half}\"" +#: src/pattern-matching/match.md:14 +msgid "'s'" +msgstr "'s'" + +#: src/pattern-matching/match.md:14 +msgid "'w'" +msgstr "'w'" + +#: src/pattern-matching/match.md:14 +msgid "'d'" +msgstr "'d'" + +#: src/pattern-matching/match.md:14 +msgid "\"Moving around\"" +msgstr "“Permutarea”" + +#: src/pattern-matching/match.md:15 src/error-handling/exercise.md:54 +#: src/error-handling/exercise.md:56 src/error-handling/exercise.md:64 +#: src/error-handling/solution.md:54 src/error-handling/solution.md:56 +#: src/error-handling/solution.md:64 +msgid "'0'" +msgstr "‘0’" + +#: src/pattern-matching/match.md:15 src/error-handling/exercise.md:54 +#: src/error-handling/exercise.md:56 src/error-handling/exercise.md:64 +#: src/error-handling/solution.md:54 src/error-handling/solution.md:56 +#: src/error-handling/solution.md:64 +msgid "'9'" +msgstr "'9'" + +#: src/pattern-matching/match.md:15 +msgid "\"Number input\"" +msgstr "\"Introducere număr\"" + +#: src/pattern-matching/match.md:16 +msgid "\"Lowercase: {key}\"" +msgstr "“Litera mică: {key}\"" + +#: src/pattern-matching/match.md:17 +msgid "\"Something else\"" +msgstr "\"Altceva\"" + +#: src/pattern-matching/match.md:22 +#, fuzzy +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 "" +"Șablonul `_` este un model jocker care se potrivește cu orice valoare. " +"Expresiile _trebuie_ să fie irefutabile, ceea ce înseamnă că acoperă orice " +"posibilitate, astfel încât `_` este adesea utilizat ca ultim caz universal." -#: src/pattern-matching/destructuring.md -msgid "\"sorry, an error happened: {msg}\"" +#: src/pattern-matching/match.md:26 +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 "" +"Potrivirea se poate folosi ca o expresie. Similar cu ‘if’, cele două părți " +"ale expresiei trebuie să aibă același tip. Dacă există, ultima expresie din " +"bloc dă tipul. În exemplul anterior, tipul este ‘()’." + +#: src/pattern-matching/match.md:30 +#, fuzzy +msgid "" +"A variable in the pattern (`key` in this example) will create a binding that " +"can be used within the match arm." +msgstr "" +"O variabilă din model (`key` în acest exemplu) va crea o legătură care poate " +"fi utilizată în cadrul brațului de potrivire." + +#: src/pattern-matching/match.md:33 +#, fuzzy +msgid "A match guard causes the arm to match only if the condition is true." +msgstr "" +"O protecție de potrivire face ca brațul să se potrivească numai dacă " +"condiția este adevărată." + +#: src/pattern-matching/match.md:40 +#, fuzzy +msgid "" +"You might point out how some specific characters are being used when in a " +"pattern" +msgstr "" +"Ați putea indica modul în care sunt folosite anumite caractere specifice " +"atunci când se află într-un șablon" + +#: src/pattern-matching/match.md:42 +msgid "`|` as an `or`" +msgstr "`|` ca un `or` (sau)" + +#: src/pattern-matching/match.md:43 +msgid "`..` can expand as much as it needs to be" +msgstr "`...` se poate extinde atât cât este nevoie" + +#: src/pattern-matching/match.md:44 +msgid "`1..=5` represents an inclusive range" +msgstr "`1..=5` reprezintă un interval inclusiv" + +#: src/pattern-matching/match.md:45 +msgid "`_` is a wild card" +msgstr "`_` este un ‘joker’" + +#: src/pattern-matching/match.md:47 +msgid "" +"Match guards as a separate syntax feature are important and necessary when " +"we wish to concisely express more complex ideas than patterns alone would " +"allow." +msgstr "" +"Gărzile de potrivire, ca o caracteristică sintactică separată, sunt " +"importante și necesare atunci când dorim să exprimăm în mod concis idei mai " +"complexe decât ne-ar permite doar șabloanele." + +#: src/pattern-matching/match.md:49 +msgid "" +"They are not the same as separate `if` expression inside of the match arm. " +"An `if` expression inside of the branch block (after `=>`) happens after the " +"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 "" +"Acestea sunt diferite de expresia `if` din interiorul ramurii de potrivire. " +"O expresie `if` în interiorul blocului de ramificare (după `=>`) apare după " +"ce este selectată ramura de potrivire. În cazul în care nu se îndeplinește " +"condiția `if` din interiorul blocului respectiv, nu vor fi luate în " +"considerare alte ramuri ale expresiei `match` originale." + +#: src/pattern-matching/match.md:53 +msgid "" +"The condition defined in the guard applies to every expression in a pattern " +"with an `|`." +msgstr "" +"Condiția definită în gardă se aplică fiecărei expresii dintr-un model cu `|`." + +#: src/pattern-matching/destructuring.md:3 +#, fuzzy +msgid "Like tuples, structs and enums can also be destructured by matching:" msgstr "" +"Ca și tuplurile, structurile și enumerațiile pot fi, de asemenea, " +"destructurate prin potrivire:" + +#: src/pattern-matching/destructuring.md:5 +#: src/pattern-matching/destructuring.md:59 +msgid "Structs" +msgstr "Structuri" + +#: src/pattern-matching/destructuring.md:17 +#, fuzzy +msgid "\"x.0 = 1, b = {b}, y = {y}\"" +msgstr "\"x.0 = 1, b = {b}, y = {y}\"" -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring.md:18 #, fuzzy +msgid "\"y = 2, x = {i:?}\"" +msgstr "\"y = 2, x = {i:?}\"" + +#: src/pattern-matching/destructuring.md:19 +#, fuzzy +msgid "\"y = {y}, other fields were ignored\"" +msgstr "\"y = {y}, celelalte câmpuri au fost ignorate\"" + +#: src/pattern-matching/destructuring.md:26 +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 "" +"Modelele pot fi, de asemenea, utilizate pentru a lega variabilele de părți " +"ale valorilor din variabile. În acest fel puteți inspecta structura " +"tipurilor dumneavoastră. Să începem cu un tip simplu `enum`:" + +#: src/pattern-matching/destructuring.md:39 +#, fuzzy +msgid "\"cannot divide {n} into two equal parts\"" +msgstr "\"nu poate împărți {n} în două părți egale\"" + +#: src/pattern-matching/destructuring.md:46 +#, fuzzy +msgid "\"{n} divided in two is {half}\"" +msgstr "\"{n} împărțit la doi este {half}\"" + +#: src/pattern-matching/destructuring.md:47 +#, fuzzy +msgid "\"sorry, an error happened: {msg}\"" +msgstr "\"Îmi pare rău, s-a produs o eroare: {msg}\"" + +#: src/pattern-matching/destructuring.md:52 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 "" -"Aici am folosit brațele pentru a _destructura_ valoarea `Result`. În primul " -"braț, `half` este legat de valoarea din interiorul variantei `Ok`. În al " -"doilea braț, `msg` este legat de mesajul de eroare." +"Aici am folosit ramificațiile pentru a _destructura_ valoarea `Result`. Pe " +"prima ramură `half` este legat de valoarea din interiorul variantei `Ok`. Pe " +"cea de-a doua ramură, `msg` este legat de mesajul de eroare." -#: src/pattern-matching/destructuring.md -#, fuzzy +#: src/pattern-matching/destructuring.md:61 msgid "Change the literal values in `foo` to match with the other patterns." msgstr "" "Modificați valorile literale din `foo` pentru a se potrivi cu celelalte " "modele." -#: src/pattern-matching/destructuring.md -#, fuzzy +#: src/pattern-matching/destructuring.md:62 msgid "Add a new field to `Foo` and make changes to the pattern as needed." msgstr "" -"Adăugați un nou câmp la `Foo` și modificați modelul după cum este necesar." +"Adăugați un nou câmp la `Foo` și modificați șablonul după cum este necesar." -#: src/pattern-matching/destructuring.md -#, fuzzy +#: src/pattern-matching/destructuring.md:63 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 "" "Distincția dintre o captură și o expresie constantă poate fi greu de " -"observat. Încercați să schimbați `2` din al doilea braț cu o variabilă și " +"observat. Încercați să schimbați `2` din a două ramură cu o variabilă și " "vedeți că, în mod subtil, nu mai funcționează. Schimbați-o într-o `const` și " "vedeți că funcționează din nou." -#: src/pattern-matching/destructuring.md -#, fuzzy +#: src/pattern-matching/destructuring.md:71 msgid "" "The `if`/`else` expression is returning an enum that is later unpacked with " "a `match`." msgstr "" -"Expresia `if`/`else` returnează o enumerație care este ulterior " -"descompactată cu un `match`." +"Expresia `if`/`else` returnează o enumerație care este ulterior descompusă " +"cu un `match`." -#: src/pattern-matching/destructuring.md -#, fuzzy +#: src/pattern-matching/destructuring.md:73 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 "" -"Puteți încerca să adăugați o a treia variantă la definiția enumului și să " +"Puteți încerca să adăugați o a treia variantă la definiția enumerării și să " "afișați erorile atunci când executați codul. Evidențiați locurile în care " "codul dvs. este acum neexhaustiv și modul în care compilatorul încearcă să " "vă ofere indicii." -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring.md:76 #, fuzzy msgid "" "The values in the enum variants can only be accessed after being pattern " @@ -5479,7 +5736,7 @@ msgstr "" "cu un model. Modelul leagă referințele la câmpurile din \"brațul de " "potrivire\" după `=>`." -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring.md:78 #, fuzzy msgid "" "Demonstrate what happens when the search is inexhaustive. Note the advantage " @@ -5487,9 +5744,10 @@ msgid "" msgstr "" "Demonstrați ce se întâmplă atunci când căutarea este neexhaustivă. Observați " "avantajul pe care îl oferă compilatorul Rust prin confirmarea momentului în " -"care sunt tratate toate cazurile." +"care sunt tratate toate cazurile. " -#: src/pattern-matching/destructuring.md +#: src/pattern-matching/destructuring.md:80 +#, fuzzy 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 " @@ -5498,33 +5756,39 @@ msgid "" "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 "" +"Salvați rezultatul `divide_in_two` în variabila `result` și `match` într-o " +"buclă. Acest lucru nu va fi compilat deoarece `msg` este consumat atunci " +"când se potrivește. Pentru a remedia problema, potriviți `&result` în loc de " +"`result`. Acest lucru va face din `msg` o referință, astfel încât nu va fi " +"consumată. Acest [\"match ergonomics\"](https://rust-lang.github.io/" +"rfcs/2005-match-ergonomics.html) a apărut în Rust 2018. Dacă doriți să " +"sprijiniți Rust mai vechi, înlocuiți `msg` cu `ref msg` în model." -#: src/pattern-matching/let-control-flow.md -#, fuzzy +#: src/pattern-matching/let-control-flow.md:3 msgid "" "Rust has a few control flow constructs which differ from other languages. " "They are used for pattern matching:" msgstr "" -"Rust are câteva construcții de flux de control care diferă de alte limbaje. " -"Acestea sunt utilizate pentru potrivirea modelelor:" +"Rust are câteva construcții pentru controlul fluxului care diferă de alte " +"limbaje. Acestea sunt utilizate pentru potrivirea șabloanelor:" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow.md:6 +#: src/pattern-matching/let-control-flow.md:10 #, fuzzy msgid "`if let` expressions" -msgstr "Expresii if let" +msgstr "Expresii ‘if let’" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow.md:7 #, fuzzy msgid "`while let` expressions" -msgstr "Expresii while let" +msgstr "Expresii ‘while let’" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow.md:8 #, fuzzy msgid "`match` expressions" -msgstr "expresii `match`" +msgstr "Expresii ‘match’" -#: src/pattern-matching/let-control-flow.md -#, fuzzy +#: src/pattern-matching/let-control-flow.md:12 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 " @@ -5532,49 +5796,65 @@ msgid "" msgstr "" "Expresia [`if let`](https://doc.rust-lang.org/reference/expressions/if-expr." "html#if-let-expressions) vă permite să executați un cod diferit în funcție " -"de potrivirea unei valori cu un model:" +"de potrivirea unei valori cu un șablon:" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow.md:24 +#, fuzzy msgid "\"slept for {:?}\"" -msgstr "" +msgstr "\"dormit pentru {:?}\"" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow.md:33 #, fuzzy msgid "`let else` expressions" msgstr "Expresii while let" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow.md:35 +#, fuzzy 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 "" +"Pentru cazul obișnuit de potrivire a unui model și de întoarcere din " +"funcție, utilizați [`let else`](https://doc.rust-lang.org/rust-by-example/" +"flow_control/let_else.html). Cazul \"else\" trebuie să difere (`return`, " +"`break` sau panică - orice altceva în afară de căderea de la sfârșitul " +"blocului)." -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow.md:45 +#: src/pattern-matching/let-control-flow.md:108 +#, fuzzy msgid "\"got None\"" -msgstr "" +msgstr "\"Nu am primit nimic\"" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow.md:51 +#: src/pattern-matching/let-control-flow.md:112 +#, fuzzy msgid "\"got empty string\"" -msgstr "" +msgstr "\"a primit un șir gol\"" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow.md:57 +#: src/pattern-matching/let-control-flow.md:116 +#, fuzzy msgid "\"not a hex digit\"" -msgstr "" +msgstr "\"nu o cifră hexagonală\"" -#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md +#: src/pattern-matching/let-control-flow.md:62 +#: src/pattern-matching/solution.md:113 +#, fuzzy msgid "\"result: {:?}\"" -msgstr "" +msgstr "“result: {}”" -#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md -#: src/smart-pointers/solution.md src/testing/googletest.md -#: src/testing/solution.md +#: src/pattern-matching/let-control-flow.md:62 src/generics/trait-bounds.md:16 +#: src/smart-pointers/solution.md:87 src/smart-pointers/solution.md:90 +#: src/testing/solution.md:83 src/android/testing.md:40 +#: src/android/testing/googletest.md:11 src/android/testing/googletest.md:12 +#, fuzzy msgid "\"foo\"" -msgstr "" +msgstr "\"foo\"" -#: src/pattern-matching/let-control-flow.md -#, fuzzy +#: src/pattern-matching/let-control-flow.md:66 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 " @@ -5584,7 +5864,7 @@ msgstr "" "rust-lang.org/reference/expressions/loop-expr.html#predicate-pattern-loops) " "care testează în mod repetat o valoare în raport cu un model:" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow.md:82 #, fuzzy msgid "" "Here [`String::pop`](https://doc.rust-lang.org/stable/std/string/struct." @@ -5597,12 +5877,12 @@ msgstr "" "după care va returna `None`. Metoda `while let` ne permite să continuăm " "iterația prin toate elementele." -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow.md:90 +#, fuzzy msgid "if-let" -msgstr "" +msgstr "Bucle `while let`" -#: src/pattern-matching/let-control-flow.md -#, fuzzy +#: src/pattern-matching/let-control-flow.md:92 msgid "" "Unlike `match`, `if let` does not have to cover all branches. This can make " "it more concise than `match`." @@ -5610,43 +5890,46 @@ msgstr "" "Spre deosebire de `match`, `if let` nu trebuie să acopere toate ramurile. " "Acest lucru îl poate face mai concis decât `match`." -#: src/pattern-matching/let-control-flow.md -#, fuzzy +#: src/pattern-matching/let-control-flow.md:94 msgid "A common usage is handling `Some` values when working with `Option`." msgstr "" "O utilizare obișnuită este manipularea valorilor `Some` atunci când se " "lucrează cu `Option`." -#: src/pattern-matching/let-control-flow.md -#, fuzzy +#: src/pattern-matching/let-control-flow.md:95 msgid "" "Unlike `match`, `if let` does not support guard clauses for pattern matching." msgstr "" "Spre deosebire de `match`, `if let` nu acceptă clauze de protecție pentru " "potrivirea de tipare." -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow.md:97 +#, fuzzy msgid "let-else" -msgstr "" +msgstr "let-else" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow.md:99 +#, fuzzy 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." msgstr "" +"`if-let`s se poate acumula, după cum se arată. Construcția `let-else` " +"permite aplatizarea acestui cod imbricate. Rescrieți versiunea ciudată " +"pentru elevi, astfel încât aceștia să poată vedea transformarea." -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow.md:103 +#, fuzzy msgid "The rewritten version is:" -msgstr "" +msgstr "Versiunea rescrisă este:" -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow.md:123 #, fuzzy msgid "while-let" msgstr "bucle `while let`" -#: src/pattern-matching/let-control-flow.md -#, fuzzy +#: src/pattern-matching/let-control-flow.md:125 msgid "" "Point out that the `while let` loop will keep going as long as the value " "matches the pattern." @@ -5654,7 +5937,7 @@ msgstr "" "Precizați că bucla `while let` va continua atâta timp cât valoarea se " "potrivește cu modelul." -#: src/pattern-matching/let-control-flow.md +#: src/pattern-matching/let-control-flow.md:127 #, fuzzy msgid "" "You could rewrite the `while let` loop as an infinite loop with an if " @@ -5665,12 +5948,12 @@ msgstr "" "care se întrerupe atunci când nu mai există nicio valoare de desfăcut pentru " "`iter.next()`. `while let` oferă zahăr sintactic pentru scenariul de mai sus." -#: src/pattern-matching/exercise.md +#: src/pattern-matching/exercise.md:3 #, fuzzy msgid "Let's write a simple recursive evaluator for arithmetic expressions." -msgstr "Să scriem un evaluator recursiv simplu pentru expresii aritmetice." +msgstr "Să scriem un evaluator recursiv pentru expresii aritmetice simplu." -#: src/pattern-matching/exercise.md +#: src/pattern-matching/exercise.md:5 #, fuzzy msgid "" "The `Box` type here is a smart pointer, and will be covered in detail later " @@ -5679,11 +5962,11 @@ msgid "" "\"unbox\" it: `eval(*boxed_expr)`." msgstr "" "Tipul `Box` de aici este un pointer inteligent și va fi tratat în detaliu " -"mai târziu în curs. O expresie poate fi \"boxată\" cu `Box::new`, așa cum se " -"vede în teste. Pentru a evalua o expresie boxată, utilizați operatorul deref " -"pentru a o \"desface\": `eval(*boxed_expr)`." +"mai târziu în curs. O expresie poate fi “încadrată” cu `Box::new`, așa cum " +"se vede în teste. Pentru a evalua o expresie încadrată, utilizați operatorul " +"de diferențiere pentru a o “despacheta”: `eval(*boxed_expr)`." -#: src/pattern-matching/exercise.md +#: src/pattern-matching/exercise.md:10 #, fuzzy msgid "" "Some expressions cannot be evaluated and will return an error. The standard " @@ -5697,7 +5980,7 @@ msgstr "" "foarte asemănător cu `Result` din biblioteca standard, pe care îl vom vedea " "mai târziu." -#: src/pattern-matching/exercise.md +#: src/pattern-matching/exercise.md:15 #, fuzzy msgid "" "Copy and paste the code into the Rust playground, and begin implementing " @@ -5709,7 +5992,7 @@ msgstr "" "`eval`. Produsul final ar trebui să treacă testele. Poate fi util să " "folosiți `todo!()` și să obțineți testele să treacă unul câte unul." -#: src/pattern-matching/exercise.md +#: src/pattern-matching/exercise.md:26 #, fuzzy msgid "" "If you finish early, try writing a test that results in division by zero or " @@ -5719,56 +6002,60 @@ msgstr "" "rezultat o depășire de număr întreg. Cum ați putea gestiona acest lucru cu " "`Res::Err` în loc de o panică?" -#: src/pattern-matching/exercise.md src/pattern-matching/solution.md +#: src/pattern-matching/exercise.md:30 src/pattern-matching/solution.md:4 +#, fuzzy msgid "/// An operation to perform on two subexpressions.\n" -msgstr "" +msgstr "/// O operație care trebuie efectuată asupra a două subexpresii.\n" -#: src/pattern-matching/exercise.md src/pattern-matching/solution.md +#: src/pattern-matching/exercise.md:38 src/pattern-matching/solution.md:12 +#, fuzzy msgid "/// An expression, in tree form.\n" -msgstr "" +msgstr "/// O expresie, în formă de arbore.\n" -#: src/pattern-matching/exercise.md src/pattern-matching/solution.md +#: src/pattern-matching/exercise.md:42 src/pattern-matching/solution.md:16 +#, fuzzy msgid "/// An operation on two subexpressions.\n" -msgstr "" +msgstr "/// O operație asupra a două subexpresii.\n" -#: src/pattern-matching/exercise.md src/pattern-matching/solution.md +#: src/pattern-matching/exercise.md:45 src/pattern-matching/solution.md:19 +#, fuzzy msgid "/// A literal value\n" -msgstr "" +msgstr "/// O valoare literală\n" -#: src/pattern-matching/exercise.md src/pattern-matching/solution.md +#: src/pattern-matching/exercise.md:104 src/pattern-matching/solution.md:40 +#: src/pattern-matching/solution.md:102 +#, fuzzy msgid "\"division by zero\"" -msgstr "" +msgstr "\"împărțirea la zero\"" -#: src/pattern-matching/solution.md +#: src/pattern-matching/solution.md:112 +#, fuzzy msgid "\"expr: {:?}\"" -msgstr "" +msgstr "\"expr: {:?}\"" -#: src/methods-and-traits.md +#: src/methods-and-traits.md:4 +#, fuzzy msgid "[Methods](./methods-and-traits/methods.md) (10 minutes)" -msgstr "" - -#: src/methods-and-traits.md -msgid "[Traits](./methods-and-traits/traits.md) (10 minutes)" -msgstr "" +msgstr "[Metode](./methods-and-traits/methods.md) (10 minute)" -#: src/methods-and-traits.md -msgid "[Deriving](./methods-and-traits/deriving.md) (5 minutes)" -msgstr "" +#: src/methods-and-traits.md:5 +#, fuzzy +msgid "[Traits](./methods-and-traits/traits.md) (15 minutes)" +msgstr "[Trăsături](./methods-and-traits/traits.md) (10 minute)" -#: src/methods-and-traits.md -msgid "[Trait Objects](./methods-and-traits/trait-objects.md) (10 minutes)" -msgstr "" +#: src/methods-and-traits.md:6 +#, fuzzy +msgid "[Deriving](./methods-and-traits/deriving.md) (3 minutes)" +msgstr "[Derivare](./methods-and-traits/deriving.md) (5 minute)" -#: src/methods-and-traits.md +#: src/methods-and-traits.md:7 +#, fuzzy msgid "" "[Exercise: Generic Logger](./methods-and-traits/exercise.md) (20 minutes)" msgstr "" +"[Exercițiu: Logger generic](./methods-and-traits/exercise.md) (20 minute)" -#: src/methods-and-traits.md -msgid "This segment should take about 55 minutes" -msgstr "" - -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:3 #, fuzzy msgid "" "Rust allows you to associate functions with your new types. You do this with " @@ -5777,43 +6064,52 @@ msgstr "" "Rust vă permite să asociați funcții cu noile dvs. tipuri. Acest lucru se " "face cu ajutorul unui bloc `impl`:" -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:14 +#, fuzzy msgid "// No receiver, a static method\n" -msgstr "" +msgstr "// Fără receptor, o metodă statică\n" -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:19 +#, fuzzy msgid "// Exclusive borrowed read-write access to self\n" -msgstr "" +msgstr "// Acces exclusiv împrumutat de citire-scriere pentru sine\n" -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:24 +#, fuzzy msgid "// Shared and read-only borrowed access to self\n" -msgstr "" +msgstr "// Acces împrumutat partajat și numai pentru citire la sine\n" -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:26 +#, fuzzy msgid "\"Recorded {} laps for {}:\"" -msgstr "" +msgstr "\"Înregistrat {} ture pentru {}:\"" -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:28 +#, fuzzy msgid "\"Lap {idx}: {lap} sec\"" -msgstr "" +msgstr "\"Tur {idx}: {lap} sec\"" -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:32 +#, fuzzy msgid "// Exclusive ownership of self\n" -msgstr "" +msgstr "// Proprietatea exclusivă a sinelui\n" -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:35 +#, fuzzy msgid "\"Race {} is finished, total lap time: {}\"" -msgstr "" +msgstr "\"Cursa {} s-a încheiat, timp total pe tur: {}\"" -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:40 +#, fuzzy msgid "\"Monaco Grand Prix\"" -msgstr "" +msgstr "\"Marele Premiu de la Monaco\"" -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:47 +#, fuzzy msgid "// race.add_lap(42);\n" -msgstr "" +msgstr "// race.add_lap(42);\n" -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:51 #, fuzzy msgid "" "The `self` arguments specify the \"receiver\" - the object the method acts " @@ -5822,7 +6118,7 @@ msgstr "" "Simbolul `&self` de mai sus indică faptul că metoda împrumută obiectul în " "mod imuabil. Există și alți receptori posibili pentru o metodă:" -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:54 #, fuzzy msgid "" "`&self`: borrows the object from the caller using a shared and immutable " @@ -5831,7 +6127,7 @@ msgstr "" "`&self`: împrumută obiectul de la apelant folosind o referință partajată și " "imuabilă. Obiectul poate fi utilizat din nou ulterior." -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:56 #, fuzzy msgid "" "`&mut self`: borrows the object from the caller using a unique and mutable " @@ -5840,7 +6136,7 @@ msgstr "" "`&mut self`: împrumută obiectul de la apelant folosind o referință unică și " "mutabilă. Obiectul poate fi utilizat din nou ulterior." -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:58 #, fuzzy msgid "" "`self`: takes ownership of the object and moves it away from the caller. The " @@ -5854,12 +6150,12 @@ msgstr "" "sa este transmisă în mod explicit. Proprietatea completă nu înseamnă automat " "mutabilitate." -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:62 #, fuzzy msgid "`mut self`: same as above, but the method can mutate the object." msgstr "`mut self`: la fel ca mai sus, dar metoda poate muta obiectul." -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:63 #, fuzzy msgid "" "No receiver: this becomes a static method on the struct. Typically used to " @@ -5868,13 +6164,13 @@ msgstr "" "Fără receptor: aceasta devine o metodă statică pe structura. Se utilizează " "de obicei pentru a crea constructori care sunt numiți `new` prin convenție." -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:71 #, fuzzy msgid "It can be helpful to introduce methods by comparing them to functions." msgstr "" "Poate fi utilă introducerea metodelor prin compararea lor cu funcțiile." -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:72 #, fuzzy msgid "" "Methods are called on an instance of a type (such as a struct or enum), the " @@ -5883,7 +6179,7 @@ msgstr "" "Metodele sunt apelate pe o instanță a unui tip (cum ar fi un struct sau " "enum), primul parametru reprezintă instanța ca `self`." -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:74 #, fuzzy msgid "" "Developers may choose to use methods to take advantage of method receiver " @@ -5895,12 +6191,12 @@ msgstr "" "utilizarea metodelor putem păstra tot codul de implementare într-un singur " "loc previzibil." -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:77 #, fuzzy msgid "Point out the use of the keyword `self`, a method receiver." msgstr "Indicați utilizarea cuvântului cheie `self`, un receptor de metodă." -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:78 #, fuzzy msgid "" "Show that it is an abbreviated term for `self: Self` and perhaps show how " @@ -5909,7 +6205,7 @@ msgstr "" "Arătați că este un termen prescurtat pentru \"sine\": Self` și, eventual, " "arătați cum ar putea fi folosit și numele structurii." -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:80 #, fuzzy msgid "" "Explain that `Self` is a type alias for the type the `impl` block is in and " @@ -5918,7 +6214,7 @@ msgstr "" "Explicați că `Self` este un alias de tip pentru tipul în care se află blocul " "`impl` și poate fi utilizat în altă parte a blocului." -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:82 #, fuzzy msgid "" "Note how `self` is used like other structs and dot notation can be used to " @@ -5927,7 +6223,7 @@ msgstr "" "Observați cum `self` este utilizat ca și alte structuri și cum notația cu " "puncte poate fi utilizată pentru a se referi la câmpuri individuale." -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:84 #, fuzzy msgid "" "This might be a good time to demonstrate how the `&self` differs from `self` " @@ -5937,7 +6233,7 @@ msgstr "" "`self` prin modificarea codului și încercarea de a rula say_hello de două " "ori." -#: src/methods-and-traits/methods.md +#: src/methods-and-traits/methods.md:86 #, fuzzy msgid "" "Beyond variants on `self`, there are also [special wrapper types](https://" @@ -5948,7 +6244,7 @@ msgstr "" "(https://doc.rust-lang.org/reference/special-types-and-traits.html) care pot " "fi tipuri de receptor, cum ar fi `Box`." -#: src/methods-and-traits/traits.md +#: src/methods-and-traits/traits.md:3 #, fuzzy msgid "" "Rust lets you abstract over types with traits. They're similar to interfaces:" @@ -5956,329 +6252,268 @@ msgstr "" "Rust vă permite să abstractizați tipurile cu ajutorul trăsăturilor. Acestea " "sunt similare cu interfețele:" -#: src/methods-and-traits/traits.md -msgid "\"Oh you're a cutie! What's your name? {}\"" -msgstr "" +#: src/methods-and-traits/traits.md:7 +#, fuzzy +msgid "/// Return a sentence from this pet.\n" +msgstr "// Reexportați tipurile din acest modul.\n" -#: src/methods-and-traits/traits.md src/methods-and-traits/trait-objects.md -msgid "\"Woof, my name is {}!\"" +#: src/methods-and-traits/traits.md:10 +#, fuzzy +msgid "/// Print a string to the terminal greeting this pet.\n" +msgstr "/// Tipărește un mesaj de salut pe ieșirea standard.\n" + +#: src/methods-and-traits/traits.md:18 +#, fuzzy +msgid "" +"A trait defines a number of methods that types must have in order to " +"implement the trait." msgstr "" +"O trăsătură definește un număr de metode pe care tipurile trebuie să le aibă " +"pentru a implementa trăsătura respectivă." -#: src/methods-and-traits/traits.md src/methods-and-traits/trait-objects.md -msgid "\"Miau!\"" +#: src/methods-and-traits/traits.md:21 +msgid "" +"In the \"Generics\" segment, next, we will see how to build functionality " +"that is generic over all types implementing a trait." msgstr "" -#: src/methods-and-traits/traits.md src/methods-and-traits/trait-objects.md +#: src/methods-and-traits/traits/implementing.md:8 +#, fuzzy +msgid "\"Oh you're a cutie! What's your name? {}\"" +msgstr "\"Oh, ești un drăguț! Cum te cheamă? {}\"" + +#: src/methods-and-traits/traits/implementing.md:19 +#: src/smart-pointers/trait-objects.md:20 +#, fuzzy +msgid "\"Woof, my name is {}!\"" +msgstr "\"Woof, numele meu este {}!\"" + +#: src/methods-and-traits/traits/implementing.md:24 +#: src/smart-pointers/trait-objects.md:33 +#, fuzzy msgid "\"Fido\"" -msgstr "" +msgstr "\"Fido\"" -#: src/methods-and-traits/traits.md +#: src/methods-and-traits/traits/implementing.md:31 +#, fuzzy msgid "" -"A trait defines a number of methods that types must have in order to " -"implement the trait." +"To implement `Trait` for `Type`, you use an `impl Trait for Type { .. }` " +"block." msgstr "" +"Trăsăturile sunt implementate într-un `impl pentru { .. }`." -#: src/methods-and-traits/traits.md -msgid "Traits are implemented in an `impl for { .. }` block." +#: src/methods-and-traits/traits/implementing.md:34 +msgid "" +"Unlike Go interfaces, just having matching methods is not enough: a `Cat` " +"type with a `talk()` method would not automatically satisfy `Pet` unless it " +"is in an `impl Pet` block." msgstr "" -#: src/methods-and-traits/traits.md +#: src/methods-and-traits/traits/implementing.md:38 #, fuzzy msgid "" -"Traits may specify pre-implemented (provided) methods and methods that users " -"are required to implement themselves. Provided methods can rely on required " -"methods. In this case, `greet` is provided, and relies on `talk`." +"Traits may provide default implementations of some methods. Default " +"implementations can rely on all the methods of the trait. In this case, " +"`greet` is provided, and relies on `talk`." msgstr "" "Trăsăturile pot specifica metode preimplementate (implicite) și metode pe " "care utilizatorii trebuie să le implementeze ei înșiși. Metodele cu " "implementări implicite se pot baza pe metodele obligatorii." -#: src/methods-and-traits/deriving.md +#: src/methods-and-traits/traits/supertraits.md:3 msgid "" -"Supported traits can be automatically implemented for your custom types, as " -"follows:" +"A trait can require that types implementing it also implement other traits, " +"called _supertraits_. Here, any type implementing `Pet` must implement " +"`Animal`." msgstr "" -#: src/methods-and-traits/deriving.md -msgid "// Default trait adds `default` constructor.\n" -msgstr "" +#: src/methods-and-traits/traits/supertraits.md:30 +#: src/async/control-flow/select.md:44 +#, fuzzy +msgid "\"Rex\"" +msgstr "\"Rex\"" -#: src/methods-and-traits/deriving.md -msgid "// Clone trait adds `clone` method.\n" -msgstr "" +#: src/methods-and-traits/traits/supertraits.md:31 +#, fuzzy +msgid "\"{} has {} legs\"" +msgstr "\"{} are {} ani\"" -#: src/methods-and-traits/deriving.md -msgid "\"EldurScrollz\"" +#: src/methods-and-traits/traits/supertraits.md:37 +msgid "" +"This is sometimes called \"trait inheritance\" but students should not " +"expect this to behave like OO inheritance. It just specifies an additional " +"requirement on implementations of a trait." msgstr "" -#: src/methods-and-traits/deriving.md -msgid "// Debug trait adds support for printing with `{:?}`.\n" +#: src/methods-and-traits/traits/associated-types.md:3 +msgid "" +"Associated types are placeholder types which are supplied by the trait " +"implementation." msgstr "" -#: src/methods-and-traits/deriving.md -msgid "\"{:?} vs. {:?}\"" -msgstr "" +#: src/methods-and-traits/traits/associated-types.md:25 +#: src/async/control-flow/join.md:30 +msgid "\"{:?}\"" +msgstr "\"{:?}\"" -#: src/methods-and-traits/deriving.md +#: src/methods-and-traits/traits/associated-types.md:31 msgid "" -"Derivation is implemented with macros, and many crates provide useful derive " -"macros to add useful functionality. For example, `serde` can derive " -"serialization support for a struct using `#[derive(Serialize)]`." +"Associated types are sometimes also called \"output types\". The key " +"observation is that the implementer, not the caller, chooses this type." msgstr "" -#: src/methods-and-traits/trait-objects.md -#, fuzzy +#: src/methods-and-traits/traits/associated-types.md:34 msgid "" -"Trait objects allow for values of different types, for instance in a " -"collection:" +"Many standard library traits have associated types, including arithmetic " +"operators and `Iterator`." msgstr "" -"Obiectele de trăsături permit valori de diferite tipuri, de exemplu într-o " -"colecție:" -#: src/methods-and-traits/trait-objects.md -msgid "\"Hello, who are you? {}\"" +#: src/methods-and-traits/deriving.md:3 +#, fuzzy +msgid "" +"Supported traits can be automatically implemented for your custom types, as " +"follows:" msgstr "" +"Trăsăturile acceptate pot fi implementate automat pentru tipurile dvs. " +"personalizate, după cum urmează:" -#: src/methods-and-traits/trait-objects.md +#: src/methods-and-traits/deriving.md:15 #, fuzzy -msgid "Memory layout after allocating `pets`:" -msgstr "Dispunerea memoriei după alocarea `pets`:" +msgid "// Default trait adds `default` constructor.\n" +msgstr "// Caracteristica implicită adaugă constructorul `default`.\n" -#: src/methods-and-traits/trait-objects.md +#: src/methods-and-traits/deriving.md:16 #, fuzzy -msgid "" -"```bob\n" -" Stack Heap\n" -".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - - - - " -"- -.\n" -": : : :\n" -": pets : : +----+----+----+----" -"+ :\n" -": +-----------+-------+ : : +-----+-----+ .->| F | i | d | o " -"| :\n" -": | ptr | o---+---+-----+-->| o o | o o | | +----+----+----+----" -"+ :\n" -": | len | 2 | : : +-|-|-+-|-|-+ " -"`---------. :\n" -": | capacity | 2 | : : | | | | data " -"| :\n" -": +-----------+-------+ : : | | | | +-------+--|-------" -"+ :\n" -": : : | | | '-->| name | o, 4, 4 " -"| :\n" -": : : | | | | age | 5 " -"| :\n" -"`- - - - - - - - - - - - - -' : | | | +-------+----------" -"+ :\n" -" : | | " -"| :\n" -" : | | | " -"vtable :\n" -" : | | | +----------------------" -"+ :\n" -" : | | '---->| \"::talk\" " -"| :\n" -" : | | +----------------------" -"+ :\n" -" : | " -"| :\n" -" : | | " -"data :\n" -" : | | +-------+-------" -"+ :\n" -" : | '-->| lives | 9 " -"| :\n" -" : | +-------+-------" -"+ :\n" -" : " -"| :\n" -" : | " -"vtable :\n" -" : | +----------------------" -"+ :\n" -" : '---->| \"::talk\" " -"| :\n" -" : +----------------------" -"+ :\n" -" : :\n" -" '- - - - - - - - - - - - - - - - - - - - - " -"- -'\n" -"```" -msgstr "" -"```bob\n" -" Stiva Heap\n" -".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - - - - - " -"-.\n" -": : : :\n" -": animale de companie : : : +----+----+----+----+----+ :\n" -": +-----------+-------+ : : : +-----+-----+ .->| F | i | d | o | :\n" -": | ptr | o---++-+-+-----+-->| o o | o o | o o | | | +----+----+----" -"+----+----+ :\n" -": | len | 2 | : : : +-|-|-|-+-|-|-|-+ `---------. :\n" -": | capacitate | 2 | : : | | | | | | date | :\n" -": +-----------+-------+ : : | | | | +-------+--|-------+ :\n" -": : : | | | | '-->|| nume | o, 4, 4 | :\n" -": : : | | | | | vârstă | 5 | :\n" -"`- - - - - - - - - - - - - -' : | | | +-------+----------+ :\n" -" : | | | :\n" -" : | | | | vtable :\n" -" : | | | +----------------------+ :\n" -" : | | '---->| \"::" -"talk\" | :\n" -" : | | +----------------------+ :\n" -" : | | :\n" -" : | | date :\n" -" : | | +-------+-------+ :\n" -" : | '-->| vieți | 9 | :\n" -" : | +-------+-------+ :\n" -" : | :\n" -" : | vtable :\n" -" : | +----------------------+ :\n" -" : '---->|| \"::talk\" | :\n" -" : +----------------------+ :\n" -" : :\n" -" '- - - - - - - - - - - - - - - - - - - - - " -"- -'\n" -"```" +msgid "// Clone trait adds `clone` method.\n" +msgstr "// Trăsătura Clone adaugă metoda `clone`.\n" -#: src/methods-and-traits/trait-objects.md +#: src/methods-and-traits/deriving.md:17 #, fuzzy -msgid "" -"Types that implement a given trait may be of different sizes. This makes it " -"impossible to have things like `Vec` in the example above." -msgstr "" -"Tipurile care implementează o anumită trăsătură pot avea dimensiuni " -"diferite. Acest lucru face imposibilă existența unor lucruri precum `Vec` în exemplul de mai sus." +msgid "\"EldurScrollz\"" +msgstr "\"EldurScrollz\"" -#: src/methods-and-traits/trait-objects.md +#: src/methods-and-traits/deriving.md:18 #, fuzzy -msgid "" -"`dyn Pet` is a way to tell the compiler about a dynamically sized type that " -"implements `Pet`." -msgstr "" -"`dyn Pet` este o modalitate de a indica compilatorului un tip dimensionat " -"dinamic care implementează `Pet`." +msgid "// Debug trait adds support for printing with `{:?}`.\n" +msgstr "// Trăsătura Debug adaugă suport pentru imprimarea cu `{:?}`.\n" -#: src/methods-and-traits/trait-objects.md +#: src/methods-and-traits/deriving.md:19 #, fuzzy -msgid "" -"In the example, `pets` is allocated on the stack and the vector data is on " -"the heap. The two vector elements are _fat pointers_:" -msgstr "" -"În acest exemplu, `pets` este alocat pe stivă, iar datele vectorului se află " -"pe heap. Cele două elemente ale vectorului sunt _fat pointeri_:" +msgid "\"{:?} vs. {:?}\"" +msgstr "Șir de caractere (string) versus str" -#: src/methods-and-traits/trait-objects.md +#: src/methods-and-traits/deriving.md:26 #, fuzzy msgid "" -"A fat pointer is a double-width pointer. It has two components: a pointer to " -"the actual object and a pointer to the [virtual method table](https://en." -"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` " -"implementation of that particular object." +"Derivation is implemented with macros, and many crates provide useful derive " +"macros to add useful functionality. For example, `serde` can derive " +"serialization support for a struct using `#[derive(Serialize)]`." msgstr "" -"Un pointer gras este un pointer cu lățime dublă. Acesta are două componente: " -"un pointer la obiectul real și un pointer la [virtual method table](https://" -"en.wikipedia.org/wiki/Virtual_method_table) (vtable) pentru implementarea " -"`Pet` a obiectului respectiv." +"Derivarea este implementată cu macro-uri, iar multe crates oferă macro-uri " +"derive utile pentru a adăuga funcționalități utile. De exemplu, `serde` " +"poate deriva suportul de serializare pentru o structură folosind " +"`#[derive(Serialize)]`." -#: src/methods-and-traits/trait-objects.md +#: src/methods-and-traits/exercise.md:1 #, fuzzy -msgid "" -"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` " -"has a `lives` field." -msgstr "" -"Datele pentru `Dog` numit Fido sunt câmpurile `name` și `age`. Pentru `Cat` " -"există un câmp `lives`." +msgid "Exercise: Logger Trait" +msgstr "Exercițiu: Logger generic" -#: src/methods-and-traits/trait-objects.md +#: src/methods-and-traits/exercise.md:3 #, fuzzy -msgid "Compare these outputs in the above example:" -msgstr "Comparați aceste ieșiri în exemplul de mai sus:" - -#: src/methods-and-traits/trait-objects.md src/std-traits/closures.md -msgid "\"{} {}\"" -msgstr "" - -#: src/methods-and-traits/trait-objects.md src/std-traits/exercise.md -#: src/std-traits/solution.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 -msgid "\"{}\"" -msgstr "" - -#: src/methods-and-traits/exercise.md msgid "" "Let's design a simple logging utility, using a trait `Logger` with a `log` " "method. Code which might log its progress can then take an `&impl Logger`. " "In testing, this might put messages in the test logfile, while in a " "production build it would send messages to a log server." msgstr "" +"Să proiectăm un utilitar de logare simplu, folosind o trăsătură `Logger` cu " +"o metodă `log`. Codul care ar putea înregistra progresul său poate lua un " +"`&impl Logger`. În timpul testelor, acesta ar putea plasa mesaje în fișierul " +"de jurnal de test, în timp ce în cazul unei compilări de producție ar " +"trimite mesaje către un server de jurnal." -#: src/methods-and-traits/exercise.md +#: src/methods-and-traits/exercise.md:8 +#, fuzzy msgid "" "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 "" +"Cu toate acestea, `StderrLogger` dat mai jos înregistrează toate mesajele, " +"indiferent de verbozitate. Sarcina dvs. este de a scrie un tip " +"`VerbosityFilter` care să ignore mesajele care depășesc o verbozitate maximă." -#: src/methods-and-traits/exercise.md +#: src/methods-and-traits/exercise.md:12 +#, fuzzy 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?" msgstr "" +"Acesta este un model comun: o structură care înfășoară o implementare a unei " +"trăsături și care implementează aceeași trăsătură, adăugând comportament în " +"acest proces. Ce alte tipuri de învelișuri ar putea fi utile într-un " +"utilitar de logare?" -#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md +#: src/methods-and-traits/exercise.md:20 src/methods-and-traits/solution.md:7 +#, fuzzy msgid "/// Log a message at the given verbosity level.\n" -msgstr "" +msgstr "/// Înregistrați un mesaj la nivelul de verbozitate dat.\n" -#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md +#: src/methods-and-traits/exercise.md:28 src/methods-and-traits/solution.md:15 +#, fuzzy msgid "\"verbosity={verbosity}: {message}\"" -msgstr "" +msgstr "\"verbosity={verbosity}: {message}\"" -#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md +#: src/methods-and-traits/exercise.md:33 src/methods-and-traits/solution.md:20 +#, fuzzy msgid "\"FYI\"" -msgstr "" +msgstr "\"FYI\"" -#: src/methods-and-traits/exercise.md src/methods-and-traits/solution.md +#: src/methods-and-traits/exercise.md:34 src/methods-and-traits/solution.md:21 +#, fuzzy msgid "\"Uhoh\"" -msgstr "" +msgstr "\"Uhoh\"" -#: src/methods-and-traits/exercise.md +#: src/methods-and-traits/exercise.md:36 +#, fuzzy msgid "// TODO: Define and implement `VerbosityFilter`.\n" -msgstr "" +msgstr "// TODO: Definiți și implementați `VerbosityFilter`.\n" -#: src/methods-and-traits/solution.md +#: src/methods-and-traits/solution.md:23 +#, fuzzy msgid "/// Only log messages up to the given verbosity level.\n" msgstr "" +"/// Înregistrați numai mesajele de jurnal până la nivelul de verbozitate " +"dat.\n" -#: src/generics.md +#: src/generics.md:4 +#, fuzzy msgid "[Generic Functions](./generics/generic-functions.md) (5 minutes)" -msgstr "" +msgstr "[Funcții generice](./generics/generic-functions.md) (5 minute)" -#: src/generics.md -msgid "[Generic Data Types](./generics/generic-data.md) (15 minutes)" -msgstr "" +#: src/generics.md:5 +#, fuzzy +msgid "[Generic Data Types](./generics/generic-data.md) (10 minutes)" +msgstr "[Tipuri de date generice](./generics/generic-data.md) (15 minute)" -#: src/generics.md +#: src/generics.md:6 +#, fuzzy msgid "[Trait Bounds](./generics/trait-bounds.md) (10 minutes)" -msgstr "" +msgstr "[Limite ale trăsăturilor](./generics/trait-bounds.md) (10 minute)" -#: src/generics.md +#: src/generics.md:7 +#, fuzzy msgid "[impl Trait](./generics/impl-trait.md) (5 minutes)" -msgstr "" +msgstr "[impl Trait](./generics/impl-trait.md) (5 minute)" -#: src/generics.md +#: src/generics.md:8 +#, fuzzy msgid "[Exercise: Generic min](./generics/exercise.md) (10 minutes)" -msgstr "" - -#: src/generics.md src/smart-pointers.md src/iterators.md src/error-handling.md -msgid "This segment should take about 45 minutes" -msgstr "" +msgstr "[Exercițiu: Generic min](./generics/exercise.md) (10 minute)" -#: src/generics/generic-functions.md +#: src/generics/generic-functions.md:3 #, fuzzy msgid "" "Rust supports generics, which lets you abstract algorithms or data " @@ -6288,33 +6523,42 @@ msgstr "" "structuri de date (cum ar fi sortarea sau un arbore binar) peste tipurile " "utilizate sau stocate." -#: src/generics/generic-functions.md +#: src/generics/generic-functions.md:7 +#, fuzzy msgid "/// Pick `even` or `odd` depending on the value of `n`.\n" -msgstr "" +msgstr "/// Alege `even` sau `odd` în funcție de valoarea lui `n`.\n" -#: src/generics/generic-functions.md +#: src/generics/generic-functions.md:17 +#, fuzzy msgid "\"picked a number: {:?}\"" -msgstr "" +msgstr "\"a ales un număr: {:?}\"" -#: src/generics/generic-functions.md +#: src/generics/generic-functions.md:18 +#, fuzzy msgid "\"picked a tuple: {:?}\"" -msgstr "" +msgstr "\"a ales un tuple: {:?}\"" -#: src/generics/generic-functions.md +#: src/generics/generic-functions.md:18 +#, fuzzy msgid "\"dog\"" -msgstr "" +msgstr "\"câine\"" -#: src/generics/generic-functions.md +#: src/generics/generic-functions.md:18 +#, fuzzy msgid "\"cat\"" -msgstr "" +msgstr "\"cat\"" -#: src/generics/generic-functions.md +#: src/generics/generic-functions.md:25 +#, fuzzy msgid "" "Rust infers a type for T based on the types of the arguments and return " "value." msgstr "" +"Rust deduce un tip pentru T pe baza tipurilor argumentelor și a valorii de " +"returnare." -#: src/generics/generic-functions.md +#: src/generics/generic-functions.md:27 +#, fuzzy 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 " @@ -6322,8 +6566,14 @@ msgid "" "`n == 0`. Even if only the `pick` instantiation with integers is used, Rust " "still considers it invalid. C++ would let you do this." msgstr "" +"Acest lucru este similar cu șabloanele C++, dar Rust compilează parțial " +"funcția generică imediat, astfel încât funcția trebuie să fie valabilă " +"pentru toate tipurile care corespund constrângerilor. De exemplu, încercați " +"să modificați `pick` pentru a returna `even + odd` dacă `n == 0`. Chiar dacă " +"se utilizează doar instanțierea `pick` cu numere întregi, Rust o consideră " +"în continuare invalidă. C++ v-ar permite să faceți acest lucru." -#: src/generics/generic-functions.md +#: src/generics/generic-functions.md:33 #, fuzzy msgid "" "Generic code is turned into non-generic code based on the call sites. This " @@ -6334,26 +6584,29 @@ msgstr "" "rezultat ca și cum ați fi codat manual structurile de date fără " "abstractizare." -#: src/generics/generic-data.md +#: src/generics/generic-data.md:3 #, fuzzy msgid "You can use generics to abstract over the concrete field type:" msgstr "" "Puteți utiliza elementele generice pentru a face abstracție de tipul de câmp " "concret:" -#: src/generics/generic-data.md +#: src/generics/generic-data.md:17 +#, fuzzy msgid "// fn set_x(&mut self, x: T)\n" -msgstr "" +msgstr "// fn set_x(&mut self, x: T)\n" -#: src/generics/generic-data.md +#: src/generics/generic-data.md:23 +#, fuzzy msgid "\"{integer:?} and {float:?}\"" -msgstr "" +msgstr "\"{integer:?} și {float:?}\"" -#: src/generics/generic-data.md +#: src/generics/generic-data.md:24 +#, fuzzy msgid "\"coords: {:?}\"" -msgstr "" +msgstr "\"coords: {:?}\"" -#: src/generics/generic-data.md +#: src/generics/generic-data.md:31 #, fuzzy msgid "" "_Q:_ Why `T` is specified twice in `impl Point {}`? Isn't that " @@ -6362,7 +6615,7 @@ msgstr "" "întrebare: De ce `T` este specificat de două ori în `impl Point {}`? " "Nu este redundant?" -#: src/generics/generic-data.md +#: src/generics/generic-data.md:33 #, fuzzy msgid "" "This is because it is a generic implementation section for generic type. " @@ -6371,17 +6624,17 @@ msgstr "" "Acest lucru se datorează faptului că este o secțiune de implementare " "generică pentru un tip generic. Acestea sunt generice în mod independent." -#: src/generics/generic-data.md +#: src/generics/generic-data.md:35 #, fuzzy msgid "It means these methods are defined for any `T`." msgstr "Aceasta înseamnă că aceste metode sunt definite pentru orice `T`." -#: src/generics/generic-data.md +#: src/generics/generic-data.md:36 #, fuzzy msgid "It is possible to write `impl Point { .. }`." msgstr "Este posibil să se scrie `impl Point { .. }`. " -#: src/generics/generic-data.md +#: src/generics/generic-data.md:37 #, fuzzy msgid "" "`Point` is still generic and you can use `Point`, but methods in this " @@ -6390,62 +6643,137 @@ msgstr "" "`Point` este în continuare generic și puteți utiliza `Point`, dar " "metodele din acest bloc vor fi disponibile numai pentru `Point`." -#: src/generics/generic-data.md +#: src/generics/generic-data.md:40 +#, fuzzy 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`." msgstr "" +"Încercați să declarați o nouă variabilă `let p = Point { x: 5, y: 10.0 };`. " +"Actualizați codul pentru a permite puncte care au elemente de tipuri " +"diferite, utilizând două variabile de tip, de exemplu, `T` și `U`." -#: src/generics/trait-bounds.md -#, fuzzy +#: src/generics/generic-traits.md:3 +msgid "" +"Traits can also be generic, just like types and functions. A trait's " +"parameters get concrete types when it is used." +msgstr "" + +#: src/generics/generic-traits.md:12 +msgid "\"Converted from integer: {from}\"" +msgstr "" + +#: src/generics/generic-traits.md:18 +msgid "\"Converted from bool: {from}\"" +msgstr "" + +#: src/generics/generic-traits.md:25 +msgid "\"{from_int:?}, {from_bool:?}\"" +msgstr "" + +#: src/generics/generic-traits.md:31 +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." +msgstr "" + +#: src/generics/generic-traits.md:35 +msgid "" +"Implementations of the trait do not need to cover all possible type " +"parameters. Here, `Foo::From(\"hello\")` would not compile because there is " +"no `From<&str>` implementation for `Foo`." +msgstr "" + +#: src/generics/generic-traits.md:39 +msgid "" +"Generic traits take types as \"input\", while associated types are a kind of " +"\"output\" type. A trait can have multiple implementations for different " +"input types." +msgstr "" + +#: src/generics/generic-traits.md:43 +msgid "" +"In fact, Rust requires that at most one implementation of a trait match for " +"any type T. Unlike some other languages, Rust has no heuristic for choosing " +"the \"most specific\" match. There is work on adding this support, called " +"[specialization](https://rust-lang.github.io/rfcs/1210-impl-specialization." +"html)." +msgstr "" + +#: src/generics/trait-bounds.md:3 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 "" -"Atunci când lucrați cu generice, deseori doriți să solicitați ca tipurile să " -"implementeze o anumită trăsătură, astfel încât să puteți apela metodele " -"acestei trăsături." +"Atunci când lucrați cu metode generice, deseori doriți să solicitați ca " +"tipurile să implementeze o anumită trăsătură, astfel încât să puteți apela " +"metodele acestei trăsături." -#: src/generics/trait-bounds.md -#, fuzzy +#: src/generics/trait-bounds.md:6 msgid "You can do this with `T: Trait` or `impl Trait`:" msgstr "Puteți face acest lucru cu `T: Trait` sau `impl Trait`:" -#: src/generics/trait-bounds.md +#: src/generics/trait-bounds.md:12 +#, fuzzy msgid "// struct NotClonable;\n" -msgstr "" +msgstr "// struct NotClonable;\n" -#: src/generics/trait-bounds.md +#: src/generics/trait-bounds.md:18 +#, fuzzy msgid "\"{pair:?}\"" msgstr "" +"```rust,editable\n" +"fn duplicate(a: T) -> (T, T) {\n" +" (a.clone(), a.clone())\n" +"}\n" +"\n" +"// Syntactic sugar for:\n" +"// fn add_42_millions>(x: T) -> i32 {\n" +"fn add_42_millions(x: impl Into) -> i32 {\n" +" x.into() + 42_000_000\n" +"}\n" +"\n" +"// struct NotClonable;\n" +"\n" +"fn main() {\n" +" let foo = String::from(“foo”);\n" +" let pair = duplicate(foo);\n" +" println!(“{pair:?}”);\n" +"\n" +" let many = add_42_millions(42_i8);\n" +" println!(“{many}”);\n" +" let many_more = add_42_millions(10_000_000);\n" +" println!(“{many_more}”);\n" +"}\n" +"```" -#: src/generics/trait-bounds.md +#: src/generics/trait-bounds.md:25 +#, fuzzy msgid "Try making a `NonClonable` and passing it to `duplicate`." -msgstr "" +msgstr "Încercați să creați un `NonClonable` și să îl treceți la `duplicate`." -#: src/generics/trait-bounds.md +#: src/generics/trait-bounds.md:27 +#, fuzzy msgid "When multiple traits are necessary, use `+` to join them." msgstr "" +"Atunci când sunt necesare mai multe trăsături, utilizați `+` pentru a le uni." -#: src/generics/trait-bounds.md -#, fuzzy +#: src/generics/trait-bounds.md:29 msgid "Show a `where` clause, students will encounter it when reading code." msgstr "" "Arătați o clauză `where`, elevii o vor întâlni atunci când vor citi codul." -#: src/generics/trait-bounds.md -#, fuzzy +#: src/generics/trait-bounds.md:40 msgid "It declutters the function signature if you have many parameters." -msgstr "Declutinează semnătura funcției dacă aveți mulți parametri." +msgstr "Aranjează semnătura funcției dacă are mulți parametri." -#: src/generics/trait-bounds.md -#, fuzzy +#: src/generics/trait-bounds.md:41 msgid "It has additional features making it more powerful." msgstr "Are caracteristici suplimentare care îl fac mai puternic." -#: src/generics/trait-bounds.md -#, fuzzy +#: src/generics/trait-bounds.md:42 msgid "" "If someone asks, the extra feature is that the type on the left of \":\" can " "be arbitrary, like `Option`." @@ -6453,40 +6781,51 @@ msgstr "" "Dacă cineva întreabă, caracteristica suplimentară este că tipul din stânga " "lui \":\" poate fi arbitrar, cum ar fi `Option`." -#: src/generics/trait-bounds.md +#: src/generics/trait-bounds.md:45 +#, fuzzy 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 "" +"Rețineți că Rust nu suportă (încă) specializarea. De exemplu, având în " +"vedere `duplicate` original, nu este valid să se adauge un `duplicate(a: " +"u32)` specializat." -#: src/generics/impl-trait.md -#, fuzzy +#: src/generics/impl-trait.md:3 msgid "" "Similar to trait bounds, an `impl Trait` syntax can be used in function " "arguments and return values:" msgstr "" "La fel ca în cazul limitelor trăsăturilor, o sintaxă `impl Trait` poate fi " -"utilizată în argumentele funcțiilor și în valorile de returnare:" +"utilizată în argumentele funcțiilor și în valorile returnate:" -#: src/generics/impl-trait.md +#: src/generics/impl-trait.md:7 +#, fuzzy msgid "" "// Syntactic sugar for:\n" "// fn add_42_millions>(x: T) -> i32 {\n" msgstr "" +"// Zahăr sintactic pentru:\n" +"// fn add_42_millions<T: Into>(x: T) -> i32 {\n" -#: src/generics/impl-trait.md +#: src/generics/impl-trait.md:19 +#, fuzzy msgid "\"{many}\"" msgstr "" +"Proiectul Rust găzduiește multe resurse. Acestea se referă la Rust în " +"general:" -#: src/generics/impl-trait.md +#: src/generics/impl-trait.md:21 +#, fuzzy msgid "\"{many_more}\"" -msgstr "" +msgstr "\"{many_more}\"" -#: src/generics/impl-trait.md +#: src/generics/impl-trait.md:23 +#, fuzzy msgid "\"debuggable: {debuggable:?}\"" -msgstr "" +msgstr "\"debuggable: {debuggable:?}\"" -#: src/generics/impl-trait.md +#: src/generics/impl-trait.md:30 #, fuzzy msgid "" "`impl Trait` allows you to work with types which you cannot name. The " @@ -6494,7 +6833,7 @@ msgid "" msgstr "" "Semnificația lui `impl Trait` este puțin diferită în diferitele poziții." -#: src/generics/impl-trait.md +#: src/generics/impl-trait.md:33 #, fuzzy msgid "" "For a parameter, `impl Trait` is like an anonymous generic parameter with a " @@ -6503,7 +6842,7 @@ msgstr "" "Pentru un parametru, `impl Trait` este ca un parametru generic anonim cu o " "trăsătură legată." -#: src/generics/impl-trait.md +#: src/generics/impl-trait.md:36 #, fuzzy msgid "" "For a return type, it means that the return type is some concrete type that " @@ -6514,7 +6853,7 @@ msgstr "" "concret care implementează trăsătura, fără a numi tipul. Acest lucru poate " "fi util atunci când nu doriți să expuneți tipul concret într-o API publică." -#: src/generics/impl-trait.md +#: src/generics/impl-trait.md:40 #, fuzzy msgid "" "Inference is hard in return position. A function returning `impl Foo` picks " @@ -6531,85 +6870,163 @@ msgstr "" "nevoit să aleagă unul, ca în cazul lui `let x: Vec<_> = foo.collect()` sau " "cu turbofishul, `foo.collect::<Vec<_>>()`." -#: src/generics/impl-trait.md +#: src/generics/impl-trait.md:47 +#, fuzzy msgid "" "What is the type of `debuggable`? Try `let debuggable: () = ..` to see what " "the error message shows." msgstr "" +"Care este tipul de `debuggable`? Încercați `let debuggable: () = ..` pentru " +"a vedea ce afișează mesajul de eroare." -#: src/generics/exercise.md +#: src/generics/exercise.md:3 +#, fuzzy msgid "" "In this short exercise, you will implement a generic `min` function that " -"determines the minimum of two values, using a `LessThan` trait." +"determines the minimum of two values, using the [`Ord`](https://doc.rust-" +"lang.org/stable/std/cmp/trait.Ord.html) trait." msgstr "" +"În acest scurt exercițiu, veți implementa o funcție generică `min` care " +"determină minimul a două valori, utilizând o trăsătură `LessThan`." -#: src/generics/exercise.md src/generics/solution.md -msgid "/// Return true if self is less than other.\n" +#: src/generics/exercise.md:8 +#, fuzzy +msgid "// TODO: implement the `min` function used in `main`.\n" +msgstr "// TODO: implementați funcția `min` folosită în `main`.\n" + +#: src/generics/exercise.md:15 src/generics/solution.md:17 +#: src/error-handling/exercise.md:62 src/error-handling/exercise.md:64 +#: src/error-handling/solution.md:62 src/error-handling/solution.md:64 +#, fuzzy +msgid "'z'" msgstr "" +"```rust,editable\n" +"fn main() {\n" +" inspect(&[0, -2, 3]);\n" +" inspect(&[0, -2, 3, 4]);\n" +"}\n" +"\n" +"#[rustfmt::skip]\n" +"fn inspect(slice: &[i32]) {\n" +" println!(\"Spune-mi despre {slice:?}\");\n" +" match slice {\n" +" &[0, y, z] => println!(\"Primul element 0, y = {y}, și z = {z}\"),\n" +" &[1, ..] => println!(\"Primul element este 1 și restul sunt " +"ignorate\"),\n" +" _ => println!(\"Toate elementele au fost ignorate\"),\n" +" }\n" +"}\n" +"```" -#: src/generics/exercise.md -msgid "// TODO: implement the `min` function used in `main`.\n" +#: src/generics/exercise.md:16 src/generics/solution.md:18 +#, fuzzy +msgid "'7'" +msgstr "‘x’" + +#: src/generics/exercise.md:16 src/generics/solution.md:18 +#, fuzzy +msgid "'1'" +msgstr "‘x’" + +#: src/generics/exercise.md:18 src/generics/solution.md:20 +msgid "\"goodbye\"" msgstr "" -#: src/generics/exercise.md src/generics/solution.md -msgid "\"Shapiro\"" +#: src/generics/exercise.md:19 src/generics/solution.md:21 +msgid "\"bat\"" msgstr "" -#: src/generics/exercise.md src/generics/solution.md -msgid "\"Baumann\"" +#: src/generics/exercise.md:19 src/generics/solution.md:21 +msgid "\"armadillo\"" msgstr "" -#: src/welcome-day-2-afternoon.md -msgid "[Standard Library Types](./std-types.md) (1 hour and 10 minutes)" +#: src/generics/exercise.md:26 +#, fuzzy +msgid "" +"Show students the [`Ord`](https://doc.rust-lang.org/stable/std/cmp/trait.Ord." +"html) trait and [`Ordering`](https://doc.rust-lang.org/stable/std/cmp/enum." +"Ordering.html) enum." msgstr "" +"[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) și " +"[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)" + +#: src/welcome-day-2-afternoon.md:4 +#, fuzzy +msgid "[Standard Library Types](./std-types.md) (1 hour and 20 minutes)" +msgstr "[Tipuri de bibliotecă standard](../std-types.md) (1 oră și 10 minute)" -#: src/welcome-day-2-afternoon.md +#: src/welcome-day-2-afternoon.md:5 +#, fuzzy msgid "[Standard Library Traits](./std-traits.md) (1 hour and 40 minutes)" msgstr "" +"[Trăsături ale bibliotecii standard](../std-traits.md) (1 oră și 40 de " +"minute)" -#: src/std-types.md -msgid "[Standard Library](./std-types/std.md) (3 minutes)" +#: src/welcome-day-2-afternoon.md:7 +#, fuzzy +msgid "" +"Including 10 minute breaks, this session should take about 3 hours and 10 " +"minutes" msgstr "" +"Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze " +"aproximativ 3 ore și 5 minute" -#: src/std-types.md +#: src/std-types.md:4 +#, fuzzy +msgid "[Standard Library](./std-types/std.md) (3 minutes)" +msgstr "[Biblioteca standard](./std-types/std.md) (3 minute)" + +#: src/std-types.md:5 +#, fuzzy msgid "[Documentation](./std-types/docs.md) (5 minutes)" -msgstr "" +msgstr "[Documentație](./std-types/docs.md) (5 minute)" -#: src/std-types.md +#: src/std-types.md:6 +#, fuzzy msgid "[Option](./std-types/option.md) (10 minutes)" -msgstr "" +msgstr "[Opțiune](./std-types/option.md) (10 minute)" -#: src/std-types.md +#: src/std-types.md:7 +#, fuzzy msgid "[Result](./std-types/result.md) (10 minutes)" -msgstr "" +msgstr "[Rezultat](./std-types/result.md) (10 minute)" -#: src/std-types.md +#: src/std-types.md:8 +#, fuzzy msgid "[String](./std-types/string.md) (10 minutes)" -msgstr "" +msgstr "[String](./std-types/string.md) (10 minute)" -#: src/std-types.md +#: src/std-types.md:9 +#, fuzzy msgid "[Vec](./std-types/vec.md) (10 minutes)" -msgstr "" +msgstr "[Vec](./std-types/vec.md) (10 minute)" -#: src/std-types.md +#: src/std-types.md:10 +#, fuzzy msgid "[HashMap](./std-types/hashmap.md) (10 minutes)" -msgstr "" +msgstr "[HashMap](./std-types/hashmap.md) (10 minute)" -#: src/std-types.md -msgid "[Exercise: Counter](./std-types/exercise.md) (10 minutes)" -msgstr "" +#: src/std-types.md:11 +#, fuzzy +msgid "[Exercise: Counter](./std-types/exercise.md) (20 minutes)" +msgstr "[Exercițiu: Contorizare](./std-types/exercise.md) (10 minute)" -#: src/std-types.md src/memory-management.md src/slices-and-lifetimes.md -msgid "This segment should take about 1 hour and 10 minutes" -msgstr "" +#: src/std-types.md:13 +#, fuzzy +msgid "This segment should take about 1 hour and 20 minutes" +msgstr "Acest segment ar trebui să dureze aproximativ 1 oră și 10 minute" -#: src/std-types.md +#: src/std-types.md:18 +#, fuzzy msgid "" "For each of the slides in this section, spend some time reviewing the " "documentation pages, highlighting some of the more common methods." msgstr "" +"Pentru fiecare dintre diapozitivele din această secțiune, petreceți ceva " +"timp examinând paginile de documentație, subliniind unele dintre cele mai " +"comune metode." -#: src/std-types/std.md +#: src/std-types/std.md:3 #, fuzzy msgid "" "Rust comes with a standard library which helps establish a set of common " @@ -6621,7 +7038,7 @@ msgstr "" "două biblioteci pot lucra împreună fără probleme, deoarece ambele utilizează " "același tip `String`." -#: src/std-types/std.md +#: src/std-types/std.md:7 #, fuzzy msgid "" "In fact, Rust contains several layers of the Standard Library: `core`, " @@ -6630,7 +7047,7 @@ msgstr "" "De fapt, Rust conține mai multe straturi ale bibliotecii standard: `core`, " "`alloc` și `std`." -#: src/std-types/std.md +#: src/std-types/std.md:10 #, fuzzy msgid "" "`core` includes the most basic types and functions that don't depend on " @@ -6639,7 +7056,7 @@ msgstr "" "`core` include cele mai de bază tipuri și funcții care nu depind de `libc`, " "de alocator sau chiar de prezența unui sistem de operare." -#: src/std-types/std.md +#: src/std-types/std.md:12 #, fuzzy msgid "" "`alloc` includes types which require a global heap allocator, such as `Vec`, " @@ -6648,18 +7065,19 @@ msgstr "" "`alloc` include tipuri care necesită un alocator global de heap, cum ar fi " "`Vec`, `Box` și `Arc`." -#: src/std-types/std.md +#: src/std-types/std.md:14 #, fuzzy msgid "" "Embedded Rust applications often only use `core`, and sometimes `alloc`." msgstr "" "Aplicațiile Rust încorporate folosesc adesea doar `core` și uneori `alloc`." -#: src/std-types/docs.md +#: src/std-types/docs.md:3 +#, fuzzy msgid "Rust comes with extensive documentation. For example:" -msgstr "" +msgstr "Rust este însoțit de o documentație extinsă. De exemplu:" -#: src/std-types/docs.md +#: src/std-types/docs.md:5 #, fuzzy msgid "" "All of the details about [loops](https://doc.rust-lang.org/stable/reference/" @@ -6668,13 +7086,16 @@ msgstr "" "Dacă doriți să ieșiți mai devreme dintr-o buclă, utilizați [`break`](https://" "doc.rust-lang.org/reference/expressions/loop-expr.html#break-expressions)," -#: src/std-types/docs.md +#: src/std-types/docs.md:7 +#, fuzzy msgid "" "Primitive types like [`u8`](https://doc.rust-lang.org/stable/std/primitive." "u8.html)." msgstr "" +"Tipuri primitive precum [`u8`](https://doc.rust-lang.org/stable/std/" +"primitive.u8.html)." -#: src/std-types/docs.md +#: src/std-types/docs.md:9 #, fuzzy msgid "" "Standard library types like [`Option`](https://doc.rust-lang.org/stable/std/" @@ -6684,19 +7105,24 @@ msgstr "" "[`str`](https://doc.rust-lang.org/std/primitive.str.html) și [`String`]" "(https://doc.rust-lang.org/std/string/struct.String.html)" -#: src/std-types/docs.md +#: src/std-types/docs.md:13 +#, fuzzy msgid "In fact, you can document your own code:" -msgstr "" +msgstr "De fapt, vă puteți documenta propriul cod:" -#: src/std-types/docs.md +#: src/std-types/docs.md:16 +#, fuzzy msgid "" "/// Determine whether the first argument is divisible by the second " "argument.\n" "///\n" "/// If the second argument is zero, the result is false.\n" msgstr "" +"/// Determină dacă primul argument este divizibil cu al doilea argument.\n" +"///\n" +"/// Dacă al doilea argument este zero, rezultatul este fals.\n" -#: src/std-types/docs.md +#: src/std-types/docs.md:27 #, fuzzy msgid "" "The contents are treated as Markdown. All published Rust library crates are " @@ -6704,26 +7130,33 @@ 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 "" -"Conținutul este tratat ca Markdown. Toate crăițele de bibliotecă Rust " +"Conținutul este tratat ca Markdown. Toate crates cu bibliotecă Rust " "publicate sunt documentate automat la [`docs.rs`](https://docs.rs) folosind " "instrumentul [rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc." -"html). Este idiomatic să se documenteze toate elementele publice dintr-o API " -"folosind acest model. Fragmentele de cod pot documenta utilizarea și vor fi " -"utilizate ca teste unitare." +"html). Documentarea tuturor elementelelor publice dintr-un API, folosind " +"acest model, este idiomatică. Fragmentele de cod pot documenta utilizarea și " +"vor fi folosite ca teste unitare." -#: src/std-types/docs.md +#: src/std-types/docs.md:32 +#, fuzzy msgid "" "To document an item from inside the item (such as inside a module), use `//!" "` or `/*! .. */`, called \"inner doc comments\":" msgstr "" +"Pentru a documenta un element din interiorul elementului (cum ar fi în " +"interiorul unui modul), utilizați `//!` sau `/*! ... */`, denumite " +"\"comentarii interne ale documentului\":" -#: src/std-types/docs.md +#: src/std-types/docs.md:36 +#, fuzzy msgid "" "//! This module contains functionality relating to divisibility of " "integers.\n" msgstr "" +"//! Acest modul conține funcționalități referitoare la divizibilitatea " +"numerelor întregi.\n" -#: src/std-types/docs.md +#: src/std-types/docs.md:42 #, fuzzy msgid "" "Show students the generated docs for the `rand` crate at `. It stores either a value of " "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 "" +"Am văzut deja cum se utilizează `Opțiunea`. Acesta stochează fie o " +"valoare de tip `T`, fie nimic. De exemplu, [`String::find`](https://doc.rust-" +"lang.org/stable/std/string/struct.String.html#method.find) returnează o " +"`Opțiune`." -#: src/std-types/option.md +#: src/std-types/option.md:10 +#, fuzzy msgid "\"Löwe 老虎 Léopard Gepardi\"" -msgstr "" +msgstr "\"Löwe 老虎 Léopard Gepardi\"" -#: src/std-types/option.md +#: src/std-types/option.md:11 +#, fuzzy msgid "'é'" -msgstr "" +msgstr "'é'" -#: src/std-types/option.md +#: src/std-types/option.md:12 src/std-types/option.md:15 +#, fuzzy msgid "\"find returned {position:?}\"" -msgstr "" +msgstr "\"find returned {position:?}\"" -#: src/std-types/option.md +#: src/std-types/option.md:14 +#, fuzzy msgid "'Z'" msgstr "" +"```rust,editable\n" +"fn main() {\n" +" inspect(&[0, -2, 3]);\n" +" inspect(&[0, -2, 3, 4]);\n" +"}\n" +"\n" +"#[rustfmt::skip]\n" +"fn inspect(slice: &[i32]) {\n" +" println!(\"Spune-mi despre {slice:?}\");\n" +" match slice {\n" +" &[0, y, z] => println!(\"Primul element 0, y = {y}, și z = {z}\"),\n" +" &[1, ..] => println!(\"Primul element este 1 și restul sunt " +"ignorate\"),\n" +" _ => println!(\"Toate elementele au fost ignorate\"),\n" +" }\n" +"}\n" +"```" -#: src/std-types/option.md +#: src/std-types/option.md:16 +#, fuzzy msgid "\"Character not found\"" -msgstr "" +msgstr "\"Caracterul nu a fost găsit\"" -#: src/std-types/option.md +#: src/std-types/option.md:23 #, fuzzy msgid "`Option` is widely used, not just in the standard library." msgstr "" "`Option` și `Result` sunt utilizate pe scară largă, nu doar în biblioteca " "standard." -#: src/std-types/option.md +#: src/std-types/option.md:24 +#, fuzzy msgid "" "`unwrap` will return the value in an `Option`, or panic. `expect` is similar " "but takes an error message." msgstr "" +"`unwrap` va returna valoarea într-un `Option` sau va intra în panică. " +"`expect` este similar, dar primește un mesaj de eroare." -#: src/std-types/option.md +#: src/std-types/option.md:26 +#, fuzzy msgid "" "You can panic on None, but you can't \"accidentally\" forget to check for " "None." msgstr "" +"Puteți intra în panică la None, dar nu puteți uita \"din greșeală\" să " +"verificați None." -#: src/std-types/option.md +#: src/std-types/option.md:28 +#, fuzzy 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 "" +"Este obișnuit să se folosească `unwrap`/`expect` peste tot atunci când se " +"lucrează împreună, dar codul de producție tratează de obicei `None` într-un " +"mod mai plăcut." -#: src/std-types/option.md +#: src/std-types/option.md:30 +#, fuzzy msgid "" "The niche optimization means that `Option` often has the same size in " "memory as `T`." msgstr "" +"Optimizarea nișei înseamnă că `Opțiunea` are adesea aceeași dimensiune în " +"memorie ca `T`." -#: src/std-types/result.md +#: src/std-types/result.md:1 msgid "Result" -msgstr "" +msgstr "Rezultat" -#: src/std-types/result.md +#: src/std-types/result.md:3 +#, fuzzy 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." msgstr "" +"`Result` este similar cu `Option`, dar indică succesul sau eșecul unei " +"operații, fiecare cu un tip diferit. Acesta este similar cu `Res` definit în " +"exercițiul de exprimare, dar generic: `Result` unde `T` este folosit " +"în varianta `Ok` și `E` apare în varianta `Err`." -#: src/std-types/result.md +#: src/std-types/result.md:13 +#, fuzzy msgid "\"diary.txt\"" -msgstr "" +msgstr "\"diary.txt\"" -#: src/std-types/result.md +#: src/std-types/result.md:18 +#, fuzzy msgid "\"Dear diary: {contents} ({bytes} bytes)\"" -msgstr "" +msgstr "\"Dragă jurnalule: {contents} ({bytes} bytes)\"" -#: src/std-types/result.md +#: src/std-types/result.md:20 +#, fuzzy msgid "\"Could not read file content\"" -msgstr "" +msgstr "\"Nu s-a putut citi conținutul fișierului\"" -#: src/std-types/result.md +#: src/std-types/result.md:24 +#, fuzzy msgid "\"The diary could not be opened: {err}\"" -msgstr "" +msgstr "\"Jurnalul nu a putut fi deschis: {err}\"" -#: src/std-types/result.md +#: src/std-types/result.md:33 #, fuzzy msgid "" "As with `Option`, the successful value sits inside of `Result`, forcing the " @@ -6837,7 +7318,7 @@ msgstr "" "apară niciodată, se poate apela la `unwrap()` sau `expect()`, iar acesta " "este și el un semnal al intenției dezvoltatorului." -#: src/std-types/result.md +#: src/std-types/result.md:37 #, fuzzy msgid "" "`Result` documentation is a recommended read. Not during the course, but it " @@ -6848,20 +7329,20 @@ msgstr "" "merită să fie menționată. Conține o mulțime de metode și funcții " "convenabile care ajută la programarea în stil funcțional." -#: src/std-types/result.md +#: src/std-types/result.md:40 #, fuzzy msgid "" "`Result` is the standard type to implement error handling as we will see on " -"Day 3." +"Day 4." msgstr "" "`Result` este tipul standard pentru a implementa gestionarea erorilor, după " "cum vom vedea în ziua 3." -#: src/std-types/string.md +#: src/std-types/string.md:1 msgid "String" msgstr "Sir" -#: src/std-types/string.md +#: src/std-types/string.md:3 #, fuzzy msgid "" "[`String`](https://doc.rust-lang.org/std/string/struct.String.html) is the " @@ -6870,33 +7351,40 @@ msgstr "" "[`String`](https://doc.rust-lang.org/std/string/struct.String.html) este " "bufferul standard de șiruri UTF-8, cu alocare în heap, care poate crește:" -#: 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/std-types/string.md:8 src/std-traits/read-and-write.md:35 +#: src/memory-management/review.md:23 src/memory-management/review.md:58 +#: src/testing/unit-tests.md:32 src/testing/unit-tests.md:37 +#: src/concurrency/scoped-threads.md:9 src/concurrency/scoped-threads.md:26 +#, fuzzy msgid "\"Hello\"" -msgstr "" +msgstr "“Hello”" -#: src/std-types/string.md +#: src/std-types/string.md:9 +#, fuzzy msgid "\"s1: len = {}, capacity = {}\"" -msgstr "" +msgstr "\"s1: len = {}, capacity = {}\"" -#: src/std-types/string.md +#: src/std-types/string.md:13 +#, fuzzy msgid "'!'" -msgstr "" +msgstr "'!'" -#: src/std-types/string.md +#: src/std-types/string.md:14 +#, fuzzy msgid "\"s2: len = {}, capacity = {}\"" -msgstr "" +msgstr "\"s2: len = {}, capacity = {}\"" -#: src/std-types/string.md +#: src/std-types/string.md:16 +#, fuzzy msgid "\"🇨🇭\"" -msgstr "" +msgstr "\"🇨🇭\"" -#: src/std-types/string.md +#: src/std-types/string.md:17 +#, fuzzy msgid "\"s3: len = {}, number of chars = {}\"" -msgstr "" +msgstr "\"s3: len = {}, număr de caractere = {}\"" -#: src/std-types/string.md +#: src/std-types/string.md:21 #, fuzzy msgid "" "`String` implements [`Deref`](https://doc.rust-lang.org/std/" @@ -6907,7 +7395,7 @@ msgstr "" "string/struct.String.html#deref-methods-str), ceea ce înseamnă că puteți " "apela toate metodele `str` pe un `String`." -#: src/std-types/string.md +#: src/std-types/string.md:30 #, fuzzy msgid "" "`String::new` returns a new empty string, use `String::with_capacity` when " @@ -6916,7 +7404,7 @@ msgstr "" "`String::new` returnează un nou șir de caractere gol, utilizați `String::" "with_capacity` atunci când știți câte date doriți să introduceți în șir." -#: src/std-types/string.md +#: src/std-types/string.md:32 #, fuzzy msgid "" "`String::len` returns the size of the `String` in bytes (which can be " @@ -6925,7 +7413,7 @@ msgstr "" "`String::len` returnează dimensiunea șirului `String` în octeți (care poate " "fi diferită de lungimea sa în caractere)." -#: src/std-types/string.md +#: src/std-types/string.md:34 #, fuzzy msgid "" "`String::chars` returns an iterator over the actual characters. Note that a " @@ -6938,7 +7426,7 @@ msgstr "" "din cauza [grapheme clusters](https://docs.rs/unicode-segmentation/latest/" "unicode_segmentation/struct.Graphemes.html)." -#: src/std-types/string.md +#: src/std-types/string.md:37 #, fuzzy msgid "" "When people refer to strings they could either be talking about `&str` or " @@ -6947,7 +7435,7 @@ msgstr "" "Atunci când oamenii se referă la șiruri de caractere, ei pot vorbi fie " "despre `&str`, fie despre `String`." -#: src/std-types/string.md +#: src/std-types/string.md:39 #, fuzzy msgid "" "When a type implements `Deref`, the compiler will let you " @@ -6956,13 +7444,16 @@ msgstr "" "Atunci când un tip implementează `Deref`, compilatorul vă va " "permite să apelați în mod transparent metodele din `T`." -#: src/std-types/string.md +#: src/std-types/string.md:41 +#, fuzzy 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 "" +"Nu am discutat încă despre trăsătura `Deref`, așa că, în acest moment, acest " +"lucru explică în mare parte structura barei laterale din documentație." -#: src/std-types/string.md +#: src/std-types/string.md:43 #, fuzzy msgid "" "`String` implements `Deref` which transparently gives it " @@ -6971,12 +7462,12 @@ msgstr "" "`String` implementează `Deref`, ceea ce îi oferă în mod " "transparent acces la metodele lui `str`." -#: src/std-types/string.md +#: src/std-types/string.md:45 #, fuzzy msgid "Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`." msgstr "Scrieți și comparați `let s3 = s1.deref();` și `let s3 = &*s1;`." -#: src/std-types/string.md +#: src/std-types/string.md:46 #, fuzzy msgid "" "`String` is implemented as a wrapper around a vector of bytes, many of the " @@ -6987,12 +7478,12 @@ msgstr "" "multe dintre operațiile pe care le vedeți acceptate pentru vectori sunt " "acceptate și pentru `String`, dar cu unele garanții suplimentare." -#: src/std-types/string.md +#: src/std-types/string.md:49 #, fuzzy msgid "Compare the different ways to index a `String`:" msgstr "Comparați diferitele moduri de a indexa un `String`:" -#: src/std-types/string.md +#: src/std-types/string.md:50 #, fuzzy msgid "" "To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, " @@ -7001,7 +7492,7 @@ msgstr "" "La un caracter prin utilizarea `s3.chars().nth(i).unwrap()` unde `i` este în " "interiorul limitelor, în afara limitelor." -#: src/std-types/string.md +#: src/std-types/string.md:52 #, fuzzy msgid "" "To a substring by using `s3[0..4]`, where that slice is on character " @@ -7010,7 +7501,16 @@ msgstr "" "La o subșiră folosind `s3[0..4]`, unde acea felie se află sau nu la limitele " "caracterelor." -#: src/std-types/vec.md +#: src/std-types/string.md:54 +msgid "" +"Many types can be converted to a string with the [`to_string`](https://doc." +"rust-lang.org/std/string/trait.ToString.html#tymethod.to_string) method. " +"This trait is automatically implemented for all types that implement " +"`Display`, so anything that can be formatted can also be converted to a " +"string." +msgstr "" + +#: src/std-types/vec.md:3 #, fuzzy msgid "" "[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) is the standard " @@ -7019,31 +7519,37 @@ msgstr "" "[`Vec`](https://doc.rust-lang.org/std/vec/struct.Vec.html) este un buffer " "standard redimensionabil alocat pe heap:" -#: src/std-types/vec.md +#: src/std-types/vec.md:9 +#, fuzzy msgid "\"v1: len = {}, capacity = {}\"" -msgstr "" +msgstr "\"v1: len = {}, capacity = {}\"" -#: src/std-types/vec.md +#: src/std-types/vec.md:14 +#, fuzzy msgid "\"v2: len = {}, capacity = {}\"" -msgstr "" +msgstr "\"v2: len = {}, capacity = {}\"" -#: src/std-types/vec.md +#: src/std-types/vec.md:16 +#, fuzzy msgid "// Canonical macro to initialize a vector with elements.\n" -msgstr "" +msgstr "// Macro canonic pentru a inițializa un vector cu elemente.\n" -#: src/std-types/vec.md +#: src/std-types/vec.md:19 +#, fuzzy msgid "// Retain only the even elements.\n" -msgstr "" +msgstr "// Reține doar elementele pare.\n" -#: src/std-types/vec.md +#: src/std-types/vec.md:21 src/std-types/vec.md:25 +#, fuzzy msgid "\"{v3:?}\"" -msgstr "" +msgstr "\"{v3:?}\"" -#: src/std-types/vec.md +#: src/std-types/vec.md:23 +#, fuzzy msgid "// Remove consecutive duplicates.\n" -msgstr "" +msgstr "// Eliminați duplicatele consecutive.\n" -#: src/std-types/vec.md +#: src/std-types/vec.md:29 #, fuzzy msgid "" "`Vec` implements [`Deref`](https://doc.rust-lang.org/std/vec/" @@ -7054,7 +7560,7 @@ msgstr "" "vec/struct.Vec.html#deref-methods-%5BT%5D), ceea ce înseamnă că puteți apela " "metode de feliere pe un `Vec`." -#: src/std-types/vec.md +#: src/std-types/vec.md:38 #, fuzzy msgid "" "`Vec` is a type of collection, along with `String` and `HashMap`. The data " @@ -7066,7 +7572,7 @@ msgstr "" "necesar să se cunoască cantitatea de date în momentul compilării. Aceasta " "poate crește sau se poate micșora în timpul execuției." -#: src/std-types/vec.md +#: src/std-types/vec.md:41 #, fuzzy msgid "" "Notice how `Vec` is a generic type too, but you don't have to specify `T` " @@ -7077,7 +7583,7 @@ msgstr "" "specificați `T` în mod explicit. Ca întotdeauna în cazul inferenței de tip " "Rust, `T` a fost stabilit în timpul primului apel `push`." -#: src/std-types/vec.md +#: src/std-types/vec.md:44 #, fuzzy msgid "" "`vec![...]` is a canonical macro to use instead of `Vec::new()` and it " @@ -7086,7 +7592,7 @@ msgstr "" "`vec![...]` este o macro canonică care poate fi utilizată în locul lui `Vec::" "new()` și permite adăugarea de elemente inițiale în vector." -#: src/std-types/vec.md +#: src/std-types/vec.md:46 #, fuzzy msgid "" "To index the vector you use `[` `]`, but they will panic if out of bounds. " @@ -7097,58 +7603,75 @@ msgstr "" "dacă este în afara limitelor. Alternativ, folosind `get` se va returna un " "`Option`. Funcția `pop` va elimina ultimul element." -#: src/std-types/vec.md +#: src/std-types/vec.md:49 +#, fuzzy 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 "" +"Feliile sunt acoperite în ziua 3. Deocamdată, studenții trebuie doar să știe " +"că o valoare de tip `Vec` oferă acces la toate metodele de feliere " +"documentate." -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:3 #, fuzzy msgid "Standard hash map with protection against HashDoS attacks:" msgstr "Hartă hash standard cu protecție împotriva atacurilor HashDoS:" -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:10 +#, fuzzy msgid "\"Adventures of Huckleberry Finn\"" -msgstr "" +msgstr "\"Aventurile lui Huckleberry Finn\"" -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:11 +#, fuzzy msgid "\"Grimms' Fairy Tales\"" -msgstr "" +msgstr "\"Basmele lui Grimms\"" -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:12 src/std-types/hashmap.md:21 +#: src/std-types/hashmap.md:29 +#, fuzzy msgid "\"Pride and Prejudice\"" -msgstr "" +msgstr "\"Mândrie și Prejudecată\"" -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:14 +#, fuzzy msgid "\"Les Misérables\"" -msgstr "" +msgstr "\"Les Misérables\"" -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:16 +#, fuzzy msgid "\"We know about {} books, but not Les Misérables.\"" -msgstr "" +msgstr "\"Știm despre {} cărți, dar nu și despre Les Misérables.\"" -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:21 src/std-types/hashmap.md:29 +#, fuzzy msgid "\"Alice's Adventure in Wonderland\"" -msgstr "" +msgstr "\"Aventura lui Alice în Țara Minunilor\"" -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:23 +#, fuzzy msgid "\"{book}: {count} pages\"" -msgstr "" +msgstr "\"{book}: {count} pagini\"" -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:24 +#, fuzzy msgid "\"{book} is unknown.\"" -msgstr "" +msgstr "\"{book} este necunoscut.\"" -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:28 +#, fuzzy msgid "// Use the .entry() method to insert a value if nothing is found.\n" msgstr "" +"// Utilizați metoda .entry() pentru a introduce o valoare dacă nu se găsește " +"nimic.\n" -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:34 +#, fuzzy msgid "\"{page_counts:#?}\"" -msgstr "" +msgstr "\"{page_counts:#?}\"" -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:41 #, fuzzy msgid "" "`HashMap` is not defined in the prelude and needs to be brought into scope." @@ -7156,7 +7679,7 @@ msgstr "" "`HashMap` nu este definit în preludiu și trebuie să fie adus în domeniul de " "aplicare." -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:42 #, fuzzy msgid "" "Try the following lines of code. The first line will see if a book is in the " @@ -7167,21 +7690,23 @@ msgstr "" "află în hashmap și, în caz contrar, va returna o valoare alternativă. A doua " "linie va introduce valoarea alternativă în hashmap dacă nu se găsește cartea." -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:48 src/std-types/hashmap.md:60 +#, fuzzy msgid "\"Harry Potter and the Sorcerer's Stone\"" -msgstr "" +msgstr "\"Harry Potter și Piatra Vrăjitoarelor\"" -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:51 src/std-types/hashmap.md:61 +#, fuzzy msgid "\"The Hunger Games\"" -msgstr "" +msgstr "\"Jocurile foamei\"" -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:54 #, fuzzy msgid "Unlike `vec!`, there is unfortunately no standard `hashmap!` macro." msgstr "" "Spre deosebire de `vec!`, din păcate nu există o macro standard `hashmap!`." -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:55 #, fuzzy msgid "" "Although, since Rust 1.56, HashMap implements [`From<[(K, V); N]>`](https://" @@ -7195,7 +7720,7 @@ msgstr "" "ceea ce ne permite să inițializăm cu ușurință o hartă hash dintr-o matrice " "literală:" -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:65 #, fuzzy msgid "" "Alternatively HashMap can be built from any `Iterator` which yields key-" @@ -7204,7 +7729,7 @@ msgstr "" "Alternativ, HashMap poate fi construit din orice `Iterator` care produce " "tupluri cheie-valoare." -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:67 #, fuzzy msgid "" "We are showing `HashMap`, and avoid using `&str` as key to make " @@ -7215,7 +7740,7 @@ msgstr "" "a face exemplele mai ușoare. Folosirea referințelor în colecții se poate " "face, desigur, dar poate duce la complicații cu verificatorul de împrumuturi." -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:70 #, fuzzy msgid "" "Try removing `to_string()` from the example above and see if it still " @@ -7224,7 +7749,7 @@ msgstr "" "Încercați să eliminați `to_string()` din exemplul de mai sus și vedeți dacă " "se compilează în continuare. Unde credeți că am putea întâmpina probleme?" -#: src/std-types/hashmap.md +#: src/std-types/hashmap.md:73 #, fuzzy msgid "" "This type has several \"method-specific\" return types, such as `std::" @@ -7237,158 +7762,224 @@ msgstr "" "din documentele Rust. Arătați studenților documentația pentru acest tip și " "legătura utilă către metoda `keys`." -#: src/std-types/exercise.md +#: src/std-types/exercise.md:3 +#, fuzzy msgid "" "In this exercise you will take a very simple data structure and make it " "generic. It uses a [`std::collections::HashMap`](https://doc.rust-lang.org/" "stable/std/collections/struct.HashMap.html) to keep track of which values " "have been seen and how many times each one has appeared." msgstr "" +"În acest exercițiu veți lua o structură de date foarte simplă și o veți face " +"generică. Aceasta utilizează un [`std::collections::HashMap`](https://doc." +"rust-lang.org/stable/std/collections/struct.HashMap.html) pentru a ține " +"evidența valorilor care au fost văzute și de câte ori a apărut fiecare " +"dintre ele." -#: src/std-types/exercise.md +#: src/std-types/exercise.md:9 +#, fuzzy msgid "" "The initial version of `Counter` is hard coded to only work for `u32` " "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 "" +"Versiunea inițială a lui `Counter` este codificată în mod greșit pentru a " +"funcționa numai pentru valori `u32`. Faceți ca structura și metodele sale să " +"fie generice pentru tipul de valoare urmărit, astfel încât `Counter` să " +"poată urmări orice tip de valoare." -#: src/std-types/exercise.md +#: src/std-types/exercise.md:13 +#, fuzzy msgid "" "If you finish early, try using the [`entry`](https://doc.rust-lang.org/" "stable/std/collections/struct.HashMap.html#method.entry) method to halve the " "number of hash lookups required to implement the `count` method." msgstr "" +"Dacă terminați mai devreme, încercați să folosiți metoda [`entry`](https://" +"doc.rust-lang.org/stable/std/collections/struct.HashMap.html#method.entry) " +"pentru a reduce la jumătate numărul de căutări hash necesare pentru a " +"implementa metoda `count`." -#: src/std-types/exercise.md src/std-types/solution.md +#: src/std-types/exercise.md:20 src/std-types/solution.md:6 +#, fuzzy msgid "" "/// Counter counts the number of times each value of type T has been seen.\n" msgstr "" +"/// Contorul numără numărul de ori de câte ori a fost văzută fiecare valoare " +"de tip T.\n" -#: src/std-types/exercise.md src/std-types/solution.md +#: src/std-types/exercise.md:27 src/std-types/solution.md:13 +#, fuzzy msgid "/// Create a new Counter.\n" -msgstr "" +msgstr "/// Creați un nou contor.\n" -#: src/std-types/exercise.md src/std-types/solution.md +#: src/std-types/exercise.md:34 src/std-types/solution.md:18 +#, fuzzy msgid "/// Count an occurrence of the given value.\n" -msgstr "" +msgstr "/// Numără o apariție a valorii date.\n" -#: src/std-types/exercise.md src/std-types/solution.md +#: src/std-types/exercise.md:43 src/std-types/solution.md:23 +#, fuzzy msgid "/// Return the number of times the given value has been seen.\n" -msgstr "" +msgstr "/// Întoarce numărul de ori în care valoarea dată a fost văzută.\n" -#: src/std-types/exercise.md src/std-types/solution.md +#: src/std-types/exercise.md:59 src/std-types/solution.md:39 +#, fuzzy msgid "\"saw {} values equal to {}\"" -msgstr "" +msgstr "\"a văzut {} valori egale cu {}\"" -#: src/std-types/exercise.md src/std-types/solution.md +#: src/std-types/exercise.md:63 src/std-types/exercise.md:65 +#: src/std-types/exercise.md:66 src/std-types/solution.md:43 +#: src/std-types/solution.md:45 src/std-types/solution.md:46 +#, fuzzy msgid "\"apple\"" -msgstr "" +msgstr "\"măr\"" -#: src/std-types/exercise.md src/std-types/solution.md +#: src/std-types/exercise.md:64 src/std-types/solution.md:44 +#, fuzzy msgid "\"orange\"" -msgstr "" +msgstr "\"portocaliu\"" -#: src/std-types/exercise.md src/std-types/solution.md +#: src/std-types/exercise.md:66 src/std-types/solution.md:46 +#, fuzzy msgid "\"got {} apples\"" -msgstr "" +msgstr "\"am primit {} mere\"" -#: src/std-traits.md +#: src/std-traits.md:4 +#, fuzzy msgid "[Comparisons](./std-traits/comparisons.md) (10 minutes)" -msgstr "" +msgstr "[Comparații](./std-traits/comparisons.md) (10 minute)" -#: src/std-traits.md +#: src/std-traits.md:5 +#, fuzzy msgid "[Operators](./std-traits/operators.md) (10 minutes)" -msgstr "" +msgstr "[Operatori](./std-traits/operators.md) (10 minute)" -#: src/std-traits.md +#: src/std-traits.md:6 +#, fuzzy msgid "[From and Into](./std-traits/from-and-into.md) (10 minutes)" -msgstr "" +msgstr "[De la și în](./std-traits/from-and-into.md) (10 minute)" -#: src/std-traits.md +#: src/std-traits.md:7 +#, fuzzy msgid "[Casting](./std-traits/casting.md) (5 minutes)" -msgstr "" +msgstr "[Casting](./std-traits/casting.md) (5 minute)" -#: src/std-traits.md +#: src/std-traits.md:8 +#, fuzzy msgid "[Read and Write](./std-traits/read-and-write.md) (10 minutes)" -msgstr "" +msgstr "[Citire și scriere](./std-traits/read-and-write.md) (10 minute)" -#: src/std-traits.md +#: src/std-traits.md:9 +#, fuzzy msgid "[Default, struct update syntax](./std-traits/default.md) (5 minutes)" msgstr "" +"[Default, sintaxa de actualizare a structurii](./std-traits/default.md) (5 " +"minute)" -#: src/std-traits.md +#: src/std-traits.md:10 +#, fuzzy msgid "[Closures](./std-traits/closures.md) (20 minutes)" -msgstr "" +msgstr "[Închideri](./std-traits/closures.md) (20 minute)" -#: src/std-traits.md +#: src/std-traits.md:11 +#, fuzzy msgid "[Exercise: ROT13](./std-traits/exercise.md) (30 minutes)" -msgstr "" +msgstr "[Exercițiu: ROT13](./std-traits/exercise.md) (30 minute)" -#: src/std-traits.md +#: src/std-traits.md:13 +#, fuzzy msgid "This segment should take about 1 hour and 40 minutes" -msgstr "" +msgstr "Acest segment ar trebui să dureze aproximativ 1 oră și 40 de minute" -#: src/std-traits.md +#: src/std-traits.md:18 +#, fuzzy msgid "" "As with the standard-library types, spend time reviewing the documentation " "for each trait." msgstr "" +"Ca și în cazul tipurilor de bibliotecă standard, petreceți timp examinând " +"documentația pentru fiecare trăsătură." -#: src/std-traits.md +#: src/std-traits.md:21 +#, fuzzy msgid "This section is long. Take a break midway through." -msgstr "" +msgstr "Această secțiune este lungă. Luați o pauză la jumătatea drumului." -#: src/std-traits/comparisons.md +#: src/std-traits/comparisons.md:3 +#, fuzzy msgid "" "These traits support comparisons between values. All traits can be derived " "for types containing fields that implement these traits." msgstr "" +"Aceste trăsături sprijină comparațiile între valori. Toate trăsăturile pot " +"fi derivate pentru tipurile care conțin câmpuri care implementează aceste " +"trăsături." -#: src/std-traits/comparisons.md +#: src/std-traits/comparisons.md:6 +#, fuzzy msgid "`PartialEq` and `Eq`" -msgstr "" +msgstr "`ParțialEq` și `Eq`" -#: src/std-traits/comparisons.md +#: src/std-traits/comparisons.md:8 +#, fuzzy msgid "" "`PartialEq` is a partial equivalence relation, with required method `eq` and " "provided method `ne`. The `==` and `!=` operators will call these methods." msgstr "" +"`PartialEq` este o relație de echivalență parțială, cu metoda obligatorie " +"`eq` și metoda furnizată `ne`. Operatorii `==` și `!=` vor apela aceste " +"metode." -#: src/std-traits/comparisons.md +#: src/std-traits/comparisons.md:23 +#, fuzzy msgid "" "`Eq` is a full equivalence relation (reflexive, symmetric, and transitive) " "and implies `PartialEq`. Functions that require full equivalence will use " "`Eq` as a trait bound." msgstr "" +"`Eq` este o relație de echivalență completă (reflexivă, simetrică și " +"tranzitivă) și implică `ParțialEq`. Funcțiile care necesită o echivalență " +"completă vor utiliza `Eq` ca o legătură de trăsătură." -#: src/std-traits/comparisons.md +#: src/std-traits/comparisons.md:27 #, fuzzy msgid "`PartialOrd` and `Ord`" msgstr "`Read` și `Write`" -#: src/std-traits/comparisons.md +#: src/std-traits/comparisons.md:29 +#, fuzzy msgid "" "`PartialOrd` defines a partial ordering, with a `partial_cmp` method. It is " "used to implement the `<`, `<=`, `>=`, and `>` operators." msgstr "" +"`PartialOrd` definește o ordine parțială, cu o metodă `partial_cmp`. Este " +"utilizat pentru a implementa operatorii `<`, `<=`, `>=` și `>`." -#: src/std-traits/comparisons.md +#: src/std-traits/comparisons.md:49 +#, fuzzy msgid "`Ord` is a total ordering, with `cmp` returning `Ordering`." -msgstr "" +msgstr "`Ord` este o ordine totală, cu `cmp` returnând `Ordering`." -#: src/std-traits/comparisons.md +#: src/std-traits/comparisons.md:54 +#, fuzzy msgid "" "`PartialEq` can be implemented between different types, but `Eq` cannot, " "because it is reflexive:" msgstr "" +"`PartialEq` poate fi implementat între tipuri diferite, dar `Eq` nu poate fi " +"implementat, deoarece este reflexiv:" -#: src/std-traits/comparisons.md +#: src/std-traits/comparisons.md:69 +#, fuzzy msgid "" "In practice, it's common to derive these traits, but uncommon to implement " "them." msgstr "" +"În practică, aceste trăsături sunt des întâlnite, dar implementarea lor este " +"mai puțin obișnuită." -#: src/std-traits/operators.md +#: src/std-traits/operators.md:3 #, fuzzy msgid "" "Operator overloading is implemented via traits in [`std::ops`](https://doc." @@ -7397,22 +7988,23 @@ msgstr "" "Supraîncărcarea operatorilor este implementată prin intermediul trăsăturilor " "în [`std::ops`](https://doc.rust-lang.org/std/ops/index.html):" -#: src/std-traits/operators.md +#: src/std-traits/operators.md:23 +#, fuzzy msgid "\"{:?} + {:?} = {:?}\"" -msgstr "" +msgstr "\"{:?} + {:?} = {:?}\"" -#: src/std-traits/operators.md src/memory-management/drop.md +#: src/std-traits/operators.md:30 src/memory-management/drop.md:48 #, fuzzy msgid "Discussion points:" msgstr "Puncte de discuție:" -#: src/std-traits/operators.md +#: src/std-traits/operators.md:32 #, fuzzy msgid "" "You could implement `Add` for `&Point`. In which situations is that useful?" msgstr "Ați putea implementa `Add` pentru `&Point`. În ce situații este utilă?" -#: src/std-traits/operators.md +#: src/std-traits/operators.md:33 #, fuzzy msgid "" "Answer: `Add:add` consumes `self`. If type `T` for which you are overloading " @@ -7424,7 +8016,7 @@ msgstr "" "operatorului și pentru `&T`. Astfel se evită clonarea inutilă pe locul de " "apel." -#: src/std-traits/operators.md +#: src/std-traits/operators.md:36 #, fuzzy msgid "" "Why is `Output` an associated type? Could it be made a type parameter of the " @@ -7433,7 +8025,7 @@ msgstr "" "De ce este `Output` un tip asociat? Ar putea fi transformat într-un " "parametru de tip al metodei?" -#: src/std-traits/operators.md +#: src/std-traits/operators.md:38 #, fuzzy msgid "" "Short answer: Function type parameters are controlled by the caller, but " @@ -7444,7 +8036,7 @@ msgstr "" "dar tipurile asociate (cum ar fi `Output`) sunt controlate de către " "implementatorul unei trăsături." -#: src/std-traits/operators.md +#: src/std-traits/operators.md:41 #, fuzzy msgid "" "You could implement `Add` for two different types, e.g. `impl Add<(i32, " @@ -7453,7 +8045,7 @@ msgstr "" "Ați putea implementa `Add` pentru două tipuri diferite, de exemplu, `impl " "Add<(i32, i32)> pentru Point` ar adăuga un tuple la un `Point`." -#: src/std-traits/from-and-into.md +#: src/std-traits/from-and-into.md:3 #, fuzzy msgid "" "Types implement [`From`](https://doc.rust-lang.org/std/convert/trait.From." @@ -7464,11 +8056,12 @@ msgstr "" "From.html) și [`Into`](https://doc.rust-lang.org/std/convert/trait.Into." "html) pentru a facilita conversiile de tip:" -#: src/std-traits/from-and-into.md +#: src/std-traits/from-and-into.md:11 src/std-traits/from-and-into.md:23 +#, fuzzy msgid "\"{s}, {addr}, {one}, {bigger}\"" -msgstr "" +msgstr "\"{s}, {addr}, {one}, {bigger}\"" -#: src/std-traits/from-and-into.md +#: src/std-traits/from-and-into.md:15 #, fuzzy msgid "" "[`Into`](https://doc.rust-lang.org/std/convert/trait.Into.html) is " @@ -7479,7 +8072,7 @@ msgstr "" "implementat automat atunci când este implementat [`From`](https://doc.rust-" "lang.org/std/convert/trait.From.html):" -#: src/std-traits/from-and-into.md +#: src/std-traits/from-and-into.md:30 #, fuzzy msgid "" "That's why it is common to only implement `From`, as your type will get " @@ -7488,7 +8081,7 @@ msgstr "" "De aceea, este obișnuit să se implementeze doar `From`, deoarece tipul tău " "va primi și implementarea `Into`." -#: src/std-traits/from-and-into.md +#: src/std-traits/from-and-into.md:32 #, fuzzy msgid "" "When declaring a function argument input type like \"anything that can be " @@ -7501,32 +8094,50 @@ msgstr "" "utilizați `Into`. Funcția dvs. va accepta tipurile care implementează `From` " "și cele care implementează _doar_ `Into`." -#: src/std-traits/casting.md +#: src/std-traits/casting.md:3 +#, fuzzy 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 nu dispune de conversii de tip _implicite_, dar suportă transformări " +"explicite cu `as`. În general, acestea urmează semantica C, acolo unde sunt " +"definite." -#: src/std-traits/casting.md +#: src/std-traits/casting.md:9 +#, fuzzy msgid "\"as u16: {}\"" -msgstr "" +msgstr "\"as u16: {}\"" -#: src/std-traits/casting.md +#: src/std-traits/casting.md:10 +#, fuzzy msgid "\"as i16: {}\"" msgstr "" +"Biblioteca standard are o implementare a `From pentru i16`, ceea ce " +"înseamnă că putem converti o variabilă `x` de tip `i8` în `i16` prin " +"apelarea `i16::from(x)`. Sau, mai simplu, cu `x.into()`, deoarece " +"implementarea `From for i16` creează automat o implementare a `Into " +"for i8`." -#: src/std-traits/casting.md +#: src/std-traits/casting.md:11 +#, fuzzy msgid "\"as u8: {}\"" -msgstr "" +msgstr "Șirurile de octeți vă permit să creați direct o valoare `&[u8]`:" -#: src/std-traits/casting.md +#: src/std-traits/casting.md:15 +#, fuzzy msgid "" "The results of `as` are _always_ defined in Rust and consistent across " "platforms. This might not match your intuition for changing sign or casting " "to a smaller type -- check the docs, and comment for clarity." msgstr "" +"Rezultatele lui `as` sunt _întotdeauna_ definite în Rust și sunt consecvente " +"pe toate platformele. Este posibil ca acest lucru să nu se potrivească cu " +"intuiția dvs. de a schimba semnul sau de a face casting la un tip mai mic - " +"verificați documentele și comentați pentru claritate." -#: src/std-traits/casting.md +#: src/std-traits/casting.md:19 +#, fuzzy msgid "" "Casting with `as` is a relatively sharp tool that is easy to use " "incorrectly, and can be a source of subtle bugs as future maintenance work " @@ -7535,31 +8146,53 @@ msgid "" "selecting the bottom 32 bits of a `u64` with `as u32`, regardless of what " "was in the high bits)." msgstr "" +"Casting-ul cu `as` este un instrument relativ ascuțit, ușor de utilizat în " +"mod incorect și poate fi o sursă de erori subtile pe măsură ce viitoarele " +"lucrări de întreținere modifică tipurile utilizate sau intervalele de valori " +"din tipuri. Castingurile se utilizează cel mai bine numai atunci când " +"intenția este de a indica o trunchiere necondiționată (de exemplu, " +"selectarea celor 32 de biți inferiori ai unui `u64` cu `as u32`, indiferent " +"de ceea ce se afla în biții superiori)." -#: src/std-traits/casting.md +#: src/std-traits/casting.md:25 +#, fuzzy msgid "" "For infallible casts (e.g. `u32` to `u64`), prefer using `From` or `Into` " "over `as` to confirm that the cast is in fact infallible. For fallible " "casts, `TryFrom` and `TryInto` are available when you want to handle casts " "that fit differently from those that don't." msgstr "" +"În cazul unor distribuții infailibile (de exemplu, de la `u32` la `u64`), se " +"preferă utilizarea lui `From` sau `Into` în locul lui `as` pentru a confirma " +"că distribuția este de fapt infailibilă. Pentru distribuțiile falibile, " +"`TryFrom` și `TryInto` sunt disponibile atunci când doriți să tratați " +"distribuțiile care se potrivesc diferit de cele care nu se potrivesc." -#: src/std-traits/casting.md +#: src/std-traits/casting.md:33 +#, fuzzy msgid "Consider taking a break after this slide." msgstr "" +"Luați în considerare posibilitatea de a lua o pauză după acest diapozitiv." -#: src/std-traits/casting.md +#: src/std-traits/casting.md:35 +#, fuzzy msgid "" "`as` is similar to a C++ static cast. Use of `as` in cases where data might " "be lost is generally discouraged, or at least deserves an explanatory " "comment." msgstr "" +"`as` este similar cu un cast static din C++. Utilizarea lui `as` în cazurile " +"în care datele ar putea fi pierdute este, în general, descurajată sau cel " +"puțin merită un comentariu explicativ." -#: src/std-traits/casting.md +#: src/std-traits/casting.md:38 +#, fuzzy msgid "This is common in casting integers to `usize` for use as an index." msgstr "" +"Acest lucru este obișnuit în cazul în care se transformă numere întregi în " +"`usize` pentru a fi utilizate ca indici." -#: src/std-traits/read-and-write.md +#: src/std-traits/read-and-write.md:3 #, fuzzy msgid "" "Using [`Read`](https://doc.rust-lang.org/std/io/trait.Read.html) and " @@ -7570,19 +8203,22 @@ msgstr "" "[`BufRead`](https://doc.rust-lang.org/std/io/trait.BufRead.html), puteți " "face abstracție de sursele `u8`:" -#: src/std-traits/read-and-write.md +#: src/std-traits/read-and-write.md:14 +#, fuzzy msgid "b\"foo\\nbar\\nbaz\\n\"" -msgstr "" +msgstr "b \"foo\\nbar\\nbaz\\n\"" -#: src/std-traits/read-and-write.md +#: src/std-traits/read-and-write.md:15 +#, fuzzy msgid "\"lines in slice: {}\"" -msgstr "" +msgstr "\"linii în slice: {}\"" -#: src/std-traits/read-and-write.md +#: src/std-traits/read-and-write.md:18 +#, fuzzy msgid "\"lines in file: {}\"" -msgstr "" +msgstr "\"linii în fișier: {}\"" -#: src/std-traits/read-and-write.md +#: src/std-traits/read-and-write.md:23 #, fuzzy msgid "" "Similarly, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) lets " @@ -7591,24 +8227,22 @@ msgstr "" "În mod similar, [`Write`](https://doc.rust-lang.org/std/io/trait.Write.html) " "vă permite să faceți abstracție de `u8` sink-uri:" -#: src/std-traits/read-and-write.md +#: src/std-traits/read-and-write.md:30 +#, fuzzy msgid "\"\\n\"" -msgstr "" +msgstr "\"\\n\"" -#: src/std-traits/read-and-write.md src/slices-and-lifetimes/str.md -msgid "\"World\"" -msgstr "" - -#: src/std-traits/read-and-write.md +#: src/std-traits/read-and-write.md:37 +#, fuzzy msgid "\"Logged: {:?}\"" -msgstr "" +msgstr "\"Înregistrat: {:?}\"" -#: src/std-traits/default.md +#: src/std-traits/default.md:1 #, fuzzy msgid "The `Default` Trait" msgstr "Trăsătura `Default` (implicit)" -#: src/std-traits/default.md +#: src/std-traits/default.md:3 #, fuzzy msgid "" "[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait " @@ -7617,35 +8251,40 @@ msgstr "" "[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) " "caracteristica produce o valoare implicită pentru un tip." -#: src/std-traits/default.md +#: src/std-traits/default.md:18 +#, fuzzy msgid "\"John Smith\"" -msgstr "" +msgstr "\"John Smith\"" -#: src/std-traits/default.md +#: src/std-traits/default.md:24 +#, fuzzy msgid "\"{default_struct:#?}\"" -msgstr "" +msgstr "‘Default’ (implicit), sintaxa de actualizare a structurilor" -#: src/std-traits/default.md +#: src/std-traits/default.md:27 +#, fuzzy msgid "\"Y is set!\"" -msgstr "" +msgstr "\"Y este stabilit!\"" -#: src/std-traits/default.md +#: src/std-traits/default.md:28 +#, fuzzy msgid "\"{almost_default_struct:#?}\"" -msgstr "" +msgstr "\"{almost_default_struct:#?}\"" -#: src/std-traits/default.md src/slices-and-lifetimes/exercise.md -#: src/slices-and-lifetimes/solution.md +#: src/std-traits/default.md:31 src/lifetimes/exercise.md:211 +#: src/lifetimes/solution.md:214 +#, fuzzy msgid "\"{:#?}\"" -msgstr "" +msgstr "\"{:#?}\"" -#: src/std-traits/default.md +#: src/std-traits/default.md:38 #, fuzzy msgid "" "It can be implemented directly or it can be derived via `#[derive(Default)]`." msgstr "" "Poate fi implementat direct sau poate fi derivat prin `#[derive(Default)]`." -#: src/std-traits/default.md +#: src/std-traits/default.md:39 #, fuzzy msgid "" "A derived implementation will produce a value where all fields are set to " @@ -7654,14 +8293,14 @@ msgstr "" "O implementare derivată va produce o valoare în care toate câmpurile sunt " "setate la valorile lor implicite." -#: src/std-traits/default.md +#: src/std-traits/default.md:41 #, fuzzy msgid "This means all types in the struct must implement `Default` too." msgstr "" "Aceasta înseamnă că toate tipurile din structura trebuie să implementeze și " "`Default`." -#: src/std-traits/default.md +#: src/std-traits/default.md:42 #, fuzzy msgid "" "Standard Rust types often implement `Default` with reasonable values (e.g. " @@ -7670,12 +8309,12 @@ msgstr "" "Tipurile standard Rust implementează adesea `Default` cu valori rezonabile " "(de exemplu, `0`, `\"\"`, etc.)." -#: src/std-traits/default.md +#: src/std-traits/default.md:44 #, fuzzy msgid "The partial struct initialization works nicely with default." msgstr "Copierea parțială a structurii funcționează bine în mod implicit." -#: src/std-traits/default.md +#: src/std-traits/default.md:45 #, fuzzy msgid "" "The Rust standard library is aware that types can implement `Default` and " @@ -7684,7 +8323,7 @@ msgstr "" "Biblioteca standard Rust este conștientă de faptul că tipurile pot " "implementa `Default` și oferă metode de conveniență care îl utilizează." -#: src/std-traits/default.md +#: src/std-traits/default.md:47 #, fuzzy msgid "" "The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/" @@ -7695,7 +8334,7 @@ msgstr "" "book/ch05-01-defining-structs.html#creating-instances-from-other-instances-" "with-struct-update-syntax)" -#: src/std-traits/closures.md +#: src/std-traits/closures.md:3 #, fuzzy msgid "" "Closures or lambda expressions have types which cannot be named. However, " @@ -7709,24 +8348,27 @@ msgstr "" "trait.FnMut.html) și [`FnOnce`](https://doc.rust-lang.org/std/ops/trait." "FnOnce.html):" -#: src/std-traits/closures.md +#: src/std-traits/closures.md:10 #, fuzzy msgid "\"Calling function on {input}\"" msgstr "Apelarea funcțiilor nesigure" -#: src/std-traits/closures.md +#: src/std-traits/closures.md:16 src/std-traits/closures.md:17 +#, fuzzy msgid "\"add_3: {}\"" -msgstr "" +msgstr "\"add_3: {}\"" -#: src/std-traits/closures.md +#: src/std-traits/closures.md:24 src/std-traits/closures.md:25 +#, fuzzy msgid "\"accumulate: {}\"" -msgstr "" +msgstr "\"acumulează: {}\"" -#: src/std-traits/closures.md +#: src/std-traits/closures.md:28 +#, fuzzy msgid "\"multiply_sum: {}\"" -msgstr "" +msgstr "\"multiply_sum: {}\"" -#: src/std-traits/closures.md +#: src/std-traits/closures.md:35 #, fuzzy msgid "" "An `Fn` (e.g. `add_3`) neither consumes nor mutates captured values, or " @@ -7737,7 +8379,7 @@ msgstr "" "capturate, sau poate nu captează nimic. Acesta poate fi apelat de mai multe " "ori simultan." -#: src/std-traits/closures.md +#: src/std-traits/closures.md:38 #, fuzzy msgid "" "An `FnMut` (e.g. `accumulate`) might mutate captured values. You can call it " @@ -7746,7 +8388,7 @@ msgstr "" "Un `FnMut` (de exemplu, `accumulate`) poate modifica valorile capturate. Se " "poate apela de mai multe ori, dar nu concomitent." -#: src/std-traits/closures.md +#: src/std-traits/closures.md:41 #, fuzzy msgid "" "If you have an `FnOnce` (e.g. `multiply_sum`), you may only call it once. It " @@ -7755,7 +8397,7 @@ msgstr "" "Dacă aveți un `FnOnce` (de exemplu, `multiply_sum`), îl puteți apela doar o " "singură dată. Acesta ar putea consuma valori capturate." -#: src/std-traits/closures.md +#: src/std-traits/closures.md:44 #, fuzzy msgid "" "`FnMut` is a subtype of `FnOnce`. `Fn` is a subtype of `FnMut` and `FnOnce`. " @@ -7766,20 +8408,28 @@ msgstr "" "`FnOnce`. Adică, puteți utiliza un `FnMut` oriunde se solicită un `FnOnce` " "și puteți utiliza un `Fn` oriunde se solicită un `FnMut` sau un `FnOnce`." -#: src/std-traits/closures.md +#: src/std-traits/closures.md:48 +#, fuzzy 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 "" +"Atunci când definiți o funcție care ia o închidere, ar trebui să luați " +"`FnOnce` dacă puteți (adică să o apelați o singură dată), sau `FnMut` în caz " +"contrar, și în final `Fn`. Acest lucru permite cea mai mare flexibilitate " +"pentru apelant." -#: src/std-traits/closures.md +#: src/std-traits/closures.md:52 +#, fuzzy 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`." msgstr "" +"În schimb, atunci când aveți o închidere, cea mai flexibilă este `Fn` (poate " +"fi trecută peste tot), apoi `FnMut` și, în cele din urmă, `FnOnce`." -#: src/std-traits/closures.md +#: src/std-traits/closures.md:55 #, fuzzy msgid "" "The compiler also infers `Copy` (e.g. for `add_3`) and `Clone` (e.g. " @@ -7789,7 +8439,7 @@ msgstr "" "`Clone` (de exemplu, `multiply_sum`), în funcție de ceea ce captează " "închiderea." -#: src/std-traits/closures.md +#: src/std-traits/closures.md:58 #, fuzzy msgid "" "By default, closures will capture by reference if they can. The `move` " @@ -7798,166 +8448,203 @@ msgstr "" "În mod implicit, închiderile vor captura prin referință dacă pot. Cuvântul " "cheie `move` le face să captureze prin valoare." -#: src/std-traits/closures.md +#: src/std-traits/closures.md:63 src/smart-pointers/trait-objects.md:91 +#: src/smart-pointers/trait-objects.md:92 +#, fuzzy +msgid "\"{} {}\"" +msgstr "\"{} {}\"" + +#: src/std-traits/closures.md:67 +#, fuzzy msgid "\"Hi\"" -msgstr "" +msgstr "\"Bună\"" -#: src/std-traits/closures.md -msgid "\"there\"" -msgstr "" +#: src/std-traits/closures.md:68 +#, fuzzy +msgid "\"Greg\"" +msgstr "\"Salutări\"" -#: src/std-traits/exercise.md +#: src/std-traits/exercise.md:3 +#, fuzzy msgid "" "In this example, you will implement the classic [\"ROT13\" cipher](https://" "en.wikipedia.org/wiki/ROT13). Copy this code to the playground, and " "implement the missing bits. Only rotate ASCII alphabetic characters, to " "ensure the result is still valid UTF-8." msgstr "" +"În acest exemplu, veți implementa cifra clasică [\"ROT13\"](https://en." +"wikipedia.org/wiki/ROT13). Copiați acest cod pe terenul de joacă și " +"implementați biții lipsă. Rotiți numai caracterele alfabetice ASCII, pentru " +"a vă asigura că rezultatul este încă valid UTF-8." -#: src/std-traits/exercise.md +#: src/std-traits/exercise.md:15 +#, fuzzy msgid "// Implement the `Read` trait for `RotDecoder`.\n" -msgstr "" +msgstr "// Implementați caracteristica `Read` pentru `RotDecoder`.\n" -#: src/std-traits/exercise.md src/std-traits/solution.md +#: src/std-traits/exercise.md:20 src/std-traits/exercise.md:33 +#: src/std-traits/solution.md:26 src/std-traits/solution.md:39 +#, fuzzy msgid "\"Gb trg gb gur bgure fvqr!\"" -msgstr "" +msgstr "\"Gb trg gb gb gur bgure fvqr!\"" -#: src/std-traits/exercise.md src/std-traits/solution.md +#: src/std-traits/exercise.md:36 src/std-traits/solution.md:42 +#, fuzzy msgid "\"To get to the other side!\"" -msgstr "" +msgstr "\"Pentru a ajunge pe partea cealaltă!\"" -#: src/std-traits/exercise.md +#: src/std-traits/exercise.md:55 +#, fuzzy msgid "" "What happens if you chain two `RotDecoder` instances together, each rotating " "by 13 characters?" msgstr "" +"Ce se întâmplă dacă înlănțuiți două instanțe `RotDecoder` împreună, fiecare " +"rotindu-se cu 13 caractere?" -#: src/std-traits/solution.md +#: src/std-traits/solution.md:16 +#, fuzzy msgid "'A'" -msgstr "" +msgstr "'A'" -#: src/welcome-day-3.md +#: src/welcome-day-3.md:1 #, fuzzy msgid "Welcome to Day 3" msgstr "Bine ați venit în ziua 3" -#: src/welcome-day-3.md +#: src/welcome-day-3.md:3 +#, fuzzy msgid "Today, we will cover:" -msgstr "" +msgstr "Astăzi, vom aborda:" -#: src/welcome-day-3.md +#: src/welcome-day-3.md:5 +#, fuzzy msgid "" "Memory management, lifetimes, and the borrow checker: how Rust ensures " "memory safety." msgstr "" +"Gestionarea memoriei, durata de viață și verificatorul de împrumuturi: cum " +"asigură Rust siguranța memoriei." -#: src/welcome-day-3.md +#: src/welcome-day-3.md:7 +#, fuzzy msgid "Smart pointers: standard library pointer types." -msgstr "" +msgstr "Indicatori inteligenți: tipuri de pointeri din biblioteca standard." -#: src/welcome-day-3.md +#: src/welcome-day-3.md:12 +#, fuzzy msgid "[Welcome](./welcome-day-3.md) (3 minutes)" -msgstr "" +msgstr "[Introducere](../welcome-day-3.md) (3 minute)" -#: src/welcome-day-3.md -msgid "[Memory Management](./memory-management.md) (1 hour and 10 minutes)" -msgstr "" +#: src/welcome-day-3.md:13 +#, fuzzy +msgid "[Memory Management](./memory-management.md) (1 hour)" +msgstr "[Managementul memoriei](../memory-management.md) (1 oră și 10 minute)" -#: src/welcome-day-3.md -msgid "[Smart Pointers](./smart-pointers.md) (45 minutes)" -msgstr "" +#: src/welcome-day-3.md:14 +#, fuzzy +msgid "[Smart Pointers](./smart-pointers.md) (55 minutes)" +msgstr "[Pointeri inteligenți](../smart-pointers.md) (45 minute)" -#: src/welcome-day-3.md +#: src/welcome-day-3.md:16 +#, fuzzy msgid "" -"Including 10 minute breaks, this session should take about 2 hours and 15 " +"Including 10 minute breaks, this session should take about 2 hours and 20 " "minutes" msgstr "" +"Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze " +"aproximativ 2 ore și 20 de minute" -#: src/memory-management.md +#: src/memory-management.md:4 +#, fuzzy msgid "[Review of Program Memory](./memory-management/review.md) (5 minutes)" msgstr "" +"[Revizuirea memoriei programului](./memory-management/review.md) (5 minute)" -#: src/memory-management.md +#: src/memory-management.md:5 +#, fuzzy msgid "" "[Approaches to Memory Management](./memory-management/approaches.md) (10 " "minutes)" msgstr "" +"[Abordări ale managementului memoriei](./memory-management/approaches.md) " +"(10 minute)" -#: src/memory-management.md +#: src/memory-management.md:6 +#, fuzzy msgid "[Ownership](./memory-management/ownership.md) (5 minutes)" -msgstr "" +msgstr "[Proprietate](./memory-management/ownership.md) (5 minute)" -#: src/memory-management.md -msgid "[Move Semantics](./memory-management/move.md) (10 minutes)" -msgstr "" +#: src/memory-management.md:7 +#, fuzzy +msgid "[Move Semantics](./memory-management/move.md) (5 minutes)" +msgstr "[Semantica mutării](./memory-management/move.md) (10 minute)" -#: src/memory-management.md +#: src/memory-management.md:8 +#, fuzzy msgid "[Clone](./memory-management/clone.md) (2 minutes)" -msgstr "" +msgstr "[Clone](./memory-management/clone.md) (2 minute)" -#: src/memory-management.md +#: src/memory-management.md:9 +#, fuzzy msgid "[Copy Types](./memory-management/copy-types.md) (5 minutes)" -msgstr "" +msgstr "[Tipuri de copiere](./memory-management/copy-types.md) (5 minute)" -#: src/memory-management.md +#: src/memory-management.md:10 +#, fuzzy msgid "[Drop](./memory-management/drop.md) (10 minutes)" -msgstr "" +msgstr "[Drop](./memory-management/drop.md) (10 minute)" -#: src/memory-management.md +#: src/memory-management.md:11 +#, fuzzy msgid "[Exercise: Builder Type](./memory-management/exercise.md) (20 minutes)" msgstr "" +"[Exercițiu: Tipul de constructor](./memory-management/exercise.md) (20 " +"minute)" -#: src/memory-management/review.md +#: src/memory-management/review.md:3 +#, fuzzy msgid "Programs allocate memory in two ways:" -msgstr "" +msgstr "Programele alocă memoria în două moduri:" -#: src/memory-management/review.md -#, fuzzy +#: src/memory-management/review.md:5 msgid "Stack: Continuous area of memory for local variables." -msgstr "Stack: Zona continuă de memorie pentru variabilele locale." +msgstr "Stiva: zona continuă de memorie pentru variabilele locale." -#: src/memory-management/review.md -#, fuzzy +#: src/memory-management/review.md:6 msgid "Values have fixed sizes known at compile time." msgstr "Valorile au dimensiuni fixe cunoscute în momentul compilării." -#: src/memory-management/review.md -#, fuzzy +#: src/memory-management/review.md:7 msgid "Extremely fast: just move a stack pointer." -msgstr "Extrem de rapid: este suficient să mutați un pointer de stivă." +msgstr "Extrem de rapid: este suficient să mutați un pointer la stivă." -#: src/memory-management/review.md -#, fuzzy +#: src/memory-management/review.md:8 msgid "Easy to manage: follows function calls." msgstr "Ușor de gestionat: urmărește apelurile de funcții." -#: src/memory-management/review.md -#, fuzzy +#: src/memory-management/review.md:9 msgid "Great memory locality." -msgstr "Localitate de mare memorie." +msgstr "Poziționate bună a memoriei." -#: src/memory-management/review.md -#, fuzzy +#: src/memory-management/review.md:11 msgid "Heap: Storage of values outside of function calls." -msgstr "Grămadă: Stocarea valorilor în afara apelurilor de funcții." +msgstr "Heap: stocarea valorilor în afara apelurilor de funcții." -#: src/memory-management/review.md -#, fuzzy +#: src/memory-management/review.md:12 msgid "Values have dynamic sizes determined at runtime." msgstr "Valorile au dimensiuni dinamice determinate la momentul execuției." -#: src/memory-management/review.md -#, fuzzy +#: src/memory-management/review.md:13 msgid "Slightly slower than the stack: some book-keeping needed." msgstr "Puțin mai lent decât stiva: este nevoie de o anumită contabilitate." -#: src/memory-management/review.md +#: src/memory-management/review.md:14 #, fuzzy msgid "No guarantee of memory locality." -msgstr "Nu există nicio garanție a localității de memorie." +msgstr "Nu există nicio garanție a poziționării memoriei." -#: src/memory-management/review.md -#, fuzzy +#: src/memory-management/review.md:18 msgid "" "Creating a `String` puts fixed-sized metadata on the stack and dynamically " "sized data, the actual string, on the heap:" @@ -7965,8 +8652,7 @@ msgstr "" "Crearea unui `String` plasează metadatele de dimensiuni fixe pe stivă și " "datele de dimensiuni dinamice, șirul propriu-zis, pe heap:" -#: src/memory-management/review.md -#, fuzzy +#: src/memory-management/review.md:44 msgid "" "Mention that a `String` is backed by a `Vec`, so it has a capacity and " "length and can grow if mutable via reallocation on the heap." @@ -7974,22 +8660,20 @@ msgstr "" "Menționați că un `String` este susținut de un `Vec`, deci are o capacitate " "și o lungime și poate crește dacă este mutabil prin realocare pe heap." -#: src/memory-management/review.md -#, fuzzy +#: src/memory-management/review.md:47 msgid "" "If students ask about it, you can mention that the underlying memory is heap " "allocated using the [System Allocator](https://doc.rust-lang.org/std/alloc/" "struct.System.html) and custom allocators can be implemented using the " "[Allocator API](https://doc.rust-lang.org/std/alloc/index.html)" msgstr "" -"Dacă elevii vă întreabă despre acest lucru, puteți menționa că memoria de " +"Dacă cursanții vă întreabă despre acest lucru, puteți menționa că memoria de " "bază este alocată în heap cu ajutorul [System Allocator](https://doc.rust-" "lang.org/std/alloc/struct.System.html) și că alocatorii personalizați pot fi " "implementați cu ajutorul [Allocator API](https://doc.rust-lang.org/std/alloc/" "index.html)" -#: src/memory-management/review.md -#, fuzzy +#: src/memory-management/review.md:53 msgid "" "We can inspect the memory layout with `unsafe` Rust. However, you should " "point out that this is rightfully unsafe!" @@ -7997,51 +8681,60 @@ msgstr "" "Putem inspecta dispunerea memoriei cu `unsafe` Rust. Cu toate acestea, ar " "trebui să precizați că acest lucru este, pe bună dreptate, nesigur!" -#: src/memory-management/review.md src/testing/unit-tests.md +#: src/memory-management/review.md:59 src/testing/unit-tests.md:15 +#, fuzzy msgid "' '" -msgstr "" +msgstr "' '" -#: src/memory-management/review.md +#: src/memory-management/review.md:60 +#, fuzzy msgid "\"world\"" -msgstr "" +msgstr "\"lume\"" -#: src/memory-management/review.md +#: src/memory-management/review.md:61 +#, fuzzy msgid "" "// DON'T DO THIS AT HOME! For educational purposes only.\n" " // String provides no guarantees about its layout, so this could lead " "to\n" " // undefined behavior.\n" msgstr "" +"// NU FACEȚI ASTA ACASĂ! Doar în scopuri educaționale.\n" +" // Șirul de caractere nu oferă nicio garanție cu privire la aspectul " +"său, astfel încât acest lucru ar putea duce la\n" +" // comportament nedefinit.\n" -#: src/memory-management/review.md -msgid "\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\"" +#: src/memory-management/review.md:66 +msgid "\"capacity = {capacity}, ptr = {ptr:#x}, len = {len}\"" msgstr "" -#: src/memory-management/approaches.md -#, fuzzy +#: src/memory-management/approaches.md:3 msgid "Traditionally, languages have fallen into two broad categories:" -msgstr "În mod tradițional, limbile se împart în două mari categorii:" +msgstr "În mod tradițional, limbajele se împart în două mari categorii:" -#: src/memory-management/approaches.md -#, fuzzy +#: src/memory-management/approaches.md:5 msgid "Full control via manual memory management: C, C++, Pascal, ..." msgstr "Control total prin gestionarea manuală a memoriei: C, C++, Pascal, ..." -#: src/memory-management/approaches.md +#: src/memory-management/approaches.md:6 +#, fuzzy msgid "Programmer decides when to allocate or free heap memory." -msgstr "" +msgstr "Programatorul decide când să aloce sau să elibereze memoria heap." -#: src/memory-management/approaches.md +#: src/memory-management/approaches.md:7 +#, fuzzy msgid "" "Programmer must determine whether a pointer still points to valid memory." msgstr "" +"Programatorul trebuie să determine dacă un pointer mai indică o memorie " +"validă." -#: src/memory-management/approaches.md +#: src/memory-management/approaches.md:8 +#, fuzzy msgid "Studies show, programmers make mistakes." -msgstr "" +msgstr "Studiile arată că programatorii fac greșeli." -#: src/memory-management/approaches.md -#, fuzzy +#: src/memory-management/approaches.md:9 msgid "" "Full safety via automatic memory management at runtime: Java, Python, Go, " "Haskell, ..." @@ -8049,67 +8742,91 @@ msgstr "" "Siguranță totală prin gestionarea automată a memoriei în timpul execuției: " "Java, Python, Go, Haskell, ..." -#: src/memory-management/approaches.md +#: src/memory-management/approaches.md:11 +#, fuzzy msgid "" "A runtime system ensures that memory is not freed until it can no longer be " "referenced." msgstr "" +"Un sistem de execuție se asigură că memoria nu este eliberată până când nu " +"mai poate fi utilizată ca referință." -#: src/memory-management/approaches.md +#: src/memory-management/approaches.md:13 +#, fuzzy msgid "" "Typically implemented with reference counting, garbage collection, or RAII." msgstr "" +"De obicei, se implementează cu numărarea referințelor, colectarea gunoiului " +"sau RAII." -#: src/memory-management/approaches.md -#, fuzzy +#: src/memory-management/approaches.md:15 msgid "Rust offers a new mix:" -msgstr "Rust oferă un nou amestec:" +msgstr "Rust oferă un nouă abordare:" -#: src/memory-management/approaches.md -#, fuzzy +#: src/memory-management/approaches.md:17 msgid "" "Full control _and_ safety via compile time enforcement of correct memory " "management." msgstr "" -"Control total _și_ siguranță prin aplicarea în timp de compilare a " +"Control total _și_ siguranță prin aplicarea în timpul compilării a " "gestionării corecte a memoriei." -#: src/memory-management/approaches.md -#, fuzzy +#: src/memory-management/approaches.md:20 msgid "It does this with an explicit ownership concept." msgstr "" -"Acest lucru se realizează cu ajutorul unui concept explicit de proprietate." +"Acest lucru se realizează cu ajutorul unui concept explicit de posesie." -#: src/memory-management/approaches.md +#: src/memory-management/approaches.md:25 +#, fuzzy msgid "" "This slide is intended to help students coming from other languages to put " "Rust in context." msgstr "" +"Această diapozitivă este menită să-i ajute pe studenții care vin din alte " +"limbi să pună Rust în context." -#: src/memory-management/approaches.md +#: src/memory-management/approaches.md:28 +#, fuzzy msgid "" "C must manage heap manually with `malloc` and `free`. Common errors include " "forgetting to call `free`, calling it multiple times for the same pointer, " "or dereferencing a pointer after the memory it points to has been freed." msgstr "" +"C trebuie să gestioneze manual heap cu `malloc` și `free`. Printre erorile " +"frecvente se numără uitarea apelării lui `free`, apelarea de mai multe ori " +"pentru același pointer sau dereferențierea unui pointer după ce memoria la " +"care acesta indică a fost eliberată." -#: src/memory-management/approaches.md +#: src/memory-management/approaches.md:32 +#, fuzzy msgid "" "C++ has tools like smart pointers (`unique_ptr`, `shared_ptr`) that take " "advantage of language guarantees about calling destructors to ensure memory " "is freed when a function returns. It is still quite easy to mis-use these " "tools and create similar bugs to C." msgstr "" +"C++ dispune de instrumente precum pointeri inteligenți (`unique_ptr`, " +"`shared_ptr`) care profită de garanțiile limbajului privind apelarea " +"destructoriilor pentru a se asigura că memoria este eliberată atunci când o " +"funcție se întoarce. Este încă destul de ușor să se utilizeze în mod greșit " +"aceste instrumente și să se creeze erori similare cu cele din C." -#: src/memory-management/approaches.md +#: src/memory-management/approaches.md:37 +#, fuzzy msgid "" "Java, Go, and Python rely on the garbage collector to identify memory that " "is no longer reachable and discard it. This guarantees that any pointer can " "be dereferenced, eliminating use-after-free and other classes of bugs. But, " "GC has a runtime cost and is difficult to tune properly." msgstr "" +"Java, Go și Python se bazează pe colectorul de gunoi pentru a identifica " +"memoria care nu mai este accesibilă și pentru a o elimina. Acest lucru " +"garantează faptul că orice pointer poate fi dereferențiat, eliminând astfel " +"utilizarea după liber și alte clase de erori. Însă, GC are un cost în timpul " +"execuției și este dificil de reglat corespunzător." -#: src/memory-management/approaches.md +#: src/memory-management/approaches.md:42 +#, fuzzy msgid "" "Rust's ownership and borrowing model can, in many cases, get the performance " "of C, with alloc and free operations precisely where they are required -- " @@ -8118,8 +8835,15 @@ msgid "" "are even third-party crates available to support runtime garbage collection " "(not covered in this class)." msgstr "" +"Modelul de proprietate și împrumut al Rust poate, în multe cazuri, să obțină " +"performanța lui C, cu alocări și operațiuni gratuite exact acolo unde sunt " +"necesare - cost zero. De asemenea, acesta oferă instrumente similare cu " +"indicatoarele inteligente din C++. Atunci când este necesar, sunt " +"disponibile și alte opțiuni, cum ar fi numărarea referințelor, și există " +"chiar și cratere de la terți disponibile pentru a sprijini colectarea " +"gunoiului în timpul execuției (nu sunt acoperite în acest curs)." -#: src/memory-management/ownership.md +#: src/memory-management/ownership.md:3 #, fuzzy msgid "" "All variable bindings have a _scope_ where they are valid and it is an error " @@ -8128,14 +8852,14 @@ msgstr "" "Toate legăturile de variabile au un _scop_ în care sunt valabile și este o " "eroare să folosești o variabilă în afara domeniului său de aplicare:" -#: src/memory-management/ownership.md +#: src/memory-management/ownership.md:20 #, fuzzy msgid "" "We say that the variable _owns_ the value. Every Rust value has precisely " "one owner at all times." msgstr "Spunem că variabila _deține_ valoarea." -#: src/memory-management/ownership.md +#: src/memory-management/ownership.md:23 #, fuzzy msgid "" "At the end of the scope, the variable is _dropped_ and the data is freed. A " @@ -8144,129 +8868,125 @@ msgstr "" "La sfârșitul domeniului de aplicare, variabila este \"eliminată\", iar " "datele sunt eliberate." -#: src/memory-management/ownership.md +#: src/memory-management/ownership.md:29 +#, fuzzy msgid "" "Students familiar with garbage-collection implementations will know that a " "garbage collector starts with a set of \"roots\" to find all reachable " "memory. Rust's \"single owner\" principle is a similar idea." msgstr "" +"Studenții familiarizați cu implementările de colectare a gunoiului știu că " +"un colector de gunoi începe cu un set de \"rădăcini\" pentru a găsi toată " +"memoria accesibilă. Principiul \"proprietarului unic\" din Rust este o idee " +"similară." -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:3 msgid "An assignment will transfer _ownership_ between variables:" -msgstr "O atribuire va transfera _proprietatea_ între variabile:" +msgstr "O atribuire va transfera _posesia_ între variabile:" -#: src/memory-management/move.md +#: src/memory-management/move.md:7 #, fuzzy msgid "\"Hello!\"" -msgstr "Bună lume!" +msgstr "“Hello”" -#: src/memory-management/move.md src/slices-and-lifetimes/str.md -msgid "\"s2: {s2}\"" -msgstr "" - -#: src/memory-management/move.md +#: src/memory-management/move.md:10 +#, fuzzy msgid "// println!(\"s1: {s1}\");\n" -msgstr "" +msgstr "// println!(\"s1: {s1}\");\n" -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:14 msgid "The assignment of `s1` to `s2` transfers ownership." -msgstr "Atribuirea lui `s1` la `s2` transferă proprietatea." +msgstr "Atribuirea lui `s1` la `s2` transferă posesiunea." -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:15 msgid "When `s1` goes out of scope, nothing happens: it does not own anything." msgstr "" -"Când `s1` iese din domeniul de aplicare, nu se întâmplă nimic: nu deține " +"Când `s1` iese din domeniul de aplicare, nu se întâmplă nimic: nu posedă " "nimic." -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:16 msgid "When `s2` goes out of scope, the string data is freed." msgstr "" "Atunci când `s2` iese din domeniul de aplicare, datele șirului de caractere " "sunt eliberate." -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:18 msgid "Before move to `s2`:" msgstr "Înainte de mutarea în `s2`:" -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:35 msgid "After move to `s2`:" msgstr "După mutarea în `s2`:" -#: src/memory-management/move.md +#: src/memory-management/move.md:37 #, fuzzy msgid "" "```bob\n" " Stack Heap\n" -".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - -.\n" -": : : :\n" -": s1 \"(inaccessible)\" : : :\n" -": +-----------+-------+ : : +----+----+----+----+ :\n" -": | ptr | o---+---+--+--+-->| R | u | s | t | :\n" -": | len | 4 | : | : +----+----+----+----+ :\n" -": | capacity | 4 | : | : :\n" -": +-----------+-------+ : | : :\n" -": : | `- - - - - - - - - - - - - -'\n" +".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - -.\n" +": : : :\n" +": s1 \"(inaccessible)\" : : :\n" +": +-----------+-------+ : : +----+----+----+----+----+----+ :\n" +": | ptr | o---+---+--+--+-->| H | e | l | l | o | ! | :\n" +": | len | 6 | : | : +----+----+----+----+----+----+ :\n" +": | capacity | 6 | : | : :\n" +": +-----------+-------+ : | : :\n" +": : | `- - - - - - - - - - - - - - - - - - -'\n" ": s2 : |\n" ": +-----------+-------+ : |\n" ": | ptr | o---+---+--'\n" -": | len | 4 | :\n" -": | capacity | 4 | :\n" +": | len | 6 | :\n" +": | capacity | 6 | :\n" ": +-----------+-------+ :\n" ": :\n" "`- - - - - - - - - - - - - -'\n" "```" msgstr "" "```bob\n" -" Stiva Heap\n" -".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - -.\n" -": : : :\n" -": s1 \"(inaccesibil)\" : : :\n" -": +-----------+-------+ : : +----+----+----+----+ :\n" -": | ptr | o---+-+---+--+--+-->| R | u | s | t | :\n" -": | len | 4 | : | : +----+----+----+----+ :\n" -": | capacitate | 4 | : | : :\n" -": +-----------+-------+ : | : :\n" -": : | `- - - - - - - - - - - - - -'\n" -": s2 : |\n" -": +-----------+-------+ : |\n" -": | ptr | o---+-+-+-+---''\n" -": | len | 4 | :\n" -": | capacitate | 4 | :\n" -": +-----------+-------+ :\n" -": :\n" -"`- - - - - - - - - - - - - -'\n" +" Stiva Heap\n" +".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - -.\n" +": : : :\n" +": s1 “(inaccesibl)” : : :\n" +": +—————+———+ : : +——+——+——+——+ :\n" +": | ptr | o—+—+—+—+—>| R | u | s | t | :\n" +": | len | 4 | : | : +——+——+——+——+ :\n" +": | capacity | 4 | : | : :\n" +": +—————+———+ : | : :\n" +": : | `- - - - - - - - - - - - - -‘\n" +": s2 : |\n" +": +—————+———+ : |\n" +": | ptr | o—+—+—‘\n" +": | len | 4 | :\n" +": | capacity | 4 | :\n" +": +—————+———+ :\n" +": :\n" +"`- - - - - - - - - - - - - -‘\n" "```" -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:58 msgid "" "When you pass a value to a function, the value is assigned to the function " "parameter. This transfers ownership:" msgstr "" "Atunci când transmiteți o valoare unei funcții, valoarea este atribuită " -"parametrului funcției. Acest lucru transferă proprietatea:" +"parametrului funcției. Acest lucru transferă posesia:" -#: src/memory-management/move.md +#: src/memory-management/move.md:63 +#, fuzzy msgid "\"Hello {name}\"" -msgstr "" +msgstr "\"Bună ziua {name}\"" -#: src/memory-management/move.md src/android/interoperability/java.md +#: src/memory-management/move.md:67 src/android/interoperability/java.md:57 #, fuzzy msgid "\"Alice\"" msgstr "Felii" -#: src/memory-management/move.md +#: src/memory-management/move.md:69 +#, fuzzy msgid "// say_hello(name);\n" -msgstr "" +msgstr "// say_hello(name);\n" -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:76 msgid "" "Mention that this is the opposite of the defaults in C++, which copies by " "value unless you use `std::move` (and the move constructor is defined!)." @@ -8275,45 +8995,41 @@ msgstr "" "copiază prin valoare, cu excepția cazului în care folosiți `std::move` (și " "constructorul move este definit!)." -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:79 msgid "" "It is only the ownership that moves. Whether any machine code is generated " "to manipulate the data itself is a matter of optimization, and such copies " "are aggressively optimized away." msgstr "" -"Doar proprietatea este cea care se mișcă. Dacă este generat vreun cod mașină " -"pentru a manipula datele în sine este o chestiune de optimizare, iar astfel " -"de copii sunt optimizate în mod agresiv." +"Doar posesia este cea care se schimbă. Generarea codului mașină pentru a " +"manipula datele în sine este o chestiune de optimizare, iar astfel de copii " +"sunt optimizate în mod agresiv." -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:83 msgid "" "Simple values (such as integers) can be marked `Copy` (see later slides)." msgstr "" "Valorile simple (cum ar fi numerele întregi) pot fi marcate cu `Copy` (a se " "vedea slide-urile ulterioare)." -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:85 msgid "In Rust, clones are explicit (by using `clone`)." msgstr "În Rust, clonele sunt explicite (prin utilizarea lui `clone`)." -#: src/memory-management/move.md +#: src/memory-management/move.md:87 +#, fuzzy msgid "In the `say_hello` example:" -msgstr "" +msgstr "În exemplul `say_hello`:" -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:89 msgid "" "With the first call to `say_hello`, `main` gives up ownership of `name`. " "Afterwards, `name` cannot be used anymore within `main`." msgstr "" -"Odată cu primul apel la `say_hello`, `main` renunță la proprietatea asupra " -"lui `name`. Ulterior, `name` nu mai poate fi utilizat în `main`." +"Odată cu primul apel la `say_hello`, `main` nu mai deține `name` și, " +"ulterior, nu îl mai poate utiliza." -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:91 msgid "" "The heap memory allocated for `name` will be freed at the end of the " "`say_hello` function." @@ -8321,7 +9037,7 @@ msgstr "" "Memoria heap alocată pentru `name` va fi eliberată la sfârșitul funcției " "`say_hello`." -#: src/memory-management/move.md +#: src/memory-management/move.md:93 #, fuzzy msgid "" "`main` can retain ownership if it passes `name` as a reference (`&name`) and " @@ -8330,7 +9046,7 @@ msgstr "" "`main` poate păstra proprietatea dacă transmite `name` ca referință " "(`&name`) și dacă `say_hello` acceptă o referință ca parametru." -#: src/memory-management/move.md +#: src/memory-management/move.md:95 #, fuzzy msgid "" "Alternatively, `main` can pass a clone of `name` in the first call (`name." @@ -8339,7 +9055,7 @@ msgstr "" "Alternativ, `main` poate transmite o clonă a lui `name` la primul apel " "(`name.clone()`)." -#: src/memory-management/move.md +#: src/memory-management/move.md:97 #, fuzzy msgid "" "Rust makes it harder than C++ to inadvertently create copies by making move " @@ -8349,62 +9065,59 @@ msgstr "" "semantica de mutare să fie cea implicită și obligând programatorii să facă " "clonele explicite." -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:102 msgid "Defensive Copies in Modern C++" msgstr "Copii defensive în C++ modern" -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:104 msgid "Modern C++ solves this differently:" msgstr "C++ modern rezolvă acest lucru în mod diferit:" -#: src/memory-management/move.md +#: src/memory-management/move.md:107 +#, fuzzy msgid "\"Cpp\"" -msgstr "" +msgstr "\"Cpp\"" -#: src/memory-management/move.md +#: src/memory-management/move.md:108 +#, fuzzy msgid "// Duplicate the data in s1.\n" -msgstr "" +msgstr "// Duplicarea datelor din s1.\n" -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:111 msgid "" "The heap data from `s1` is duplicated and `s2` gets its own independent copy." msgstr "" "Datele din heap de la `s1` sunt duplicate, iar `s2` primește propria copie " "independentă." -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:112 msgid "When `s1` and `s2` go out of scope, they each free their own memory." msgstr "" "Atunci când `s1` și `s2` ies din domeniul de aplicare, fiecare își " "eliberează propria memorie." -#: src/memory-management/move.md +#: src/memory-management/move.md:114 #, fuzzy msgid "Before copy-assignment:" -msgstr "Înainte de atribuirea de copii:" +msgstr "Înainte de atribuirea copiilor:" -#: src/memory-management/move.md +#: src/memory-management/move.md:130 #, fuzzy msgid "After copy-assignment:" -msgstr "După atribuirea de copii:" +msgstr "După atribuirea copiilor:" -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:155 msgid "" "C++ has made a slightly different choice than Rust. Because `=` copies data, " "the string data has to be cloned. Otherwise we would get a double-free when " "either string goes out of scope." msgstr "" -"C++ a făcut o alegere ușor diferită față de Rust. Deoarece `=` copiază date, " -"datele șirului de caractere trebuie clonate. În caz contrar, am obține un " -"dublu liber atunci când oricare dintre șiruri iese din domeniu." +"În C++ a fost făcută o alegere ușor diferită față de Rust. Deoarece `=` " +"copiază date, datele șirului de caractere trebuie clonate. În caz contrar, " +"am obține o dublă eliberare atunci când oricare dintre șiruri iese din " +"domeniu." -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:159 msgid "" "C++ also has [`std::move`](https://en.cppreference.com/w/cpp/utility/move), " "which is used to indicate when a value may be moved from. If the example had " @@ -8419,8 +9132,7 @@ msgstr "" "nespecificată. Spre deosebire de Rust, programatorului i se permite să " "continue să folosească `s1`." -#: src/memory-management/move.md -#, fuzzy +#: src/memory-management/move.md:164 msgid "" "Unlike Rust, `=` in C++ can run arbitrary code as determined by the type " "which is being copied or moved." @@ -8428,30 +9140,39 @@ msgstr "" "Spre deosebire de Rust, `=` în C++ poate rula cod arbitrar în funcție de " "tipul care este copiat sau mutat." -#: src/memory-management/clone.md +#: src/memory-management/clone.md:1 msgid "Clone" -msgstr "" +msgstr "Clonare" -#: src/memory-management/clone.md +#: src/memory-management/clone.md:3 +#, fuzzy msgid "" "Sometimes you _want_ to make a copy of a value. The `Clone` trait " "accomplishes this." msgstr "" +"Uneori, doriți să faceți o copie a unei valori. Caracteristica `Clone` " +"realizează acest lucru." -#: src/memory-management/clone.md +#: src/memory-management/clone.md:24 +#, fuzzy 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`." msgstr "" +"Ideea lui `Clone` este de a face mai ușor de observat unde au loc alocări de " +"heap. Căutați `.clone()` și alte câteva ca `Vec::new` sau `Box::new`." -#: src/memory-management/clone.md +#: src/memory-management/clone.md:27 +#, fuzzy msgid "" "It's common to \"clone your way out\" of problems with the borrow checker, " "and return later to try to optimize those clones away." msgstr "" +"Este obișnuit să \"clonezi\" problemele cu verificatorul de împrumuturi și " +"să revii mai târziu pentru a încerca să optimizezi acele clone." -#: src/memory-management/copy-types.md +#: src/memory-management/copy-types.md:3 #, fuzzy msgid "" "While move semantics are the default, certain types are copied by default:" @@ -8459,33 +9180,33 @@ msgstr "" "În timp ce semantica de mutare este cea implicită, anumite tipuri sunt " "copiate în mod implicit:" -#: src/memory-management/copy-types.md +#: src/memory-management/copy-types.md:16 #, fuzzy msgid "These types implement the `Copy` trait." msgstr "Aceste tipuri implementează trăsătura `Copy`." -#: src/memory-management/copy-types.md +#: src/memory-management/copy-types.md:18 #, fuzzy msgid "You can opt-in your own types to use copy semantics:" msgstr "" "Puteți opta pentru ca propriile tipuri să utilizeze semantica de copiere:" -#: src/memory-management/copy-types.md +#: src/memory-management/copy-types.md:34 #, fuzzy msgid "After the assignment, both `p1` and `p2` own their own data." msgstr "După atribuire, atât `p1` cât și `p2` dețin propriile date." -#: src/memory-management/copy-types.md +#: src/memory-management/copy-types.md:35 #, fuzzy msgid "We can also use `p1.clone()` to explicitly copy the data." msgstr "De asemenea, putem folosi `p1.clone()` pentru a copia explicit datele." -#: src/memory-management/copy-types.md +#: src/memory-management/copy-types.md:40 #, fuzzy msgid "Copying and cloning are not the same thing:" msgstr "Copierea și clonarea nu sunt același lucru:" -#: src/memory-management/copy-types.md +#: src/memory-management/copy-types.md:42 #, fuzzy msgid "" "Copying refers to bitwise copies of memory regions and does not work on " @@ -8494,7 +9215,7 @@ msgstr "" "Copierea se referă la copiile pe biți ale regiunilor de memorie și nu " "funcționează pe obiecte arbitrare." -#: src/memory-management/copy-types.md +#: src/memory-management/copy-types.md:44 #, fuzzy msgid "" "Copying does not allow for custom logic (unlike copy constructors in C++)." @@ -8502,7 +9223,7 @@ msgstr "" "Copierea nu permite o logică personalizată (spre deosebire de constructorii " "de copiere din C++)." -#: src/memory-management/copy-types.md +#: src/memory-management/copy-types.md:45 #, fuzzy msgid "" "Cloning is a more general operation and also allows for custom behavior by " @@ -8511,18 +9232,18 @@ msgstr "" "Clonarea este o operațiune mai generală și permite, de asemenea, un " "comportament personalizat prin implementarea trăsăturii `Clone`." -#: src/memory-management/copy-types.md +#: src/memory-management/copy-types.md:47 #, fuzzy msgid "Copying does not work on types that implement the `Drop` trait." msgstr "" "Copierea nu funcționează pe tipurile care implementează trăsătura `Drop`." -#: src/memory-management/copy-types.md +#: src/memory-management/copy-types.md:49 #, fuzzy msgid "In the above example, try the following:" msgstr "În exemplul de mai sus, încercați următoarele:" -#: src/memory-management/copy-types.md +#: src/memory-management/copy-types.md:51 #, fuzzy msgid "" "Add a `String` field to `struct Point`. It will not compile because `String` " @@ -8531,7 +9252,7 @@ msgstr "" "Adăugați un câmp `String` la `struct Point`. Nu se va compila deoarece " "`String` nu este un tip `Copy`." -#: src/memory-management/copy-types.md +#: src/memory-management/copy-types.md:53 #, fuzzy msgid "" "Remove `Copy` from the `derive` attribute. The compiler error is now in the " @@ -8540,17 +9261,17 @@ msgstr "" "Elimină `Copy` din atributul `derive`. Eroarea de compilare se află acum în " "`println!` pentru `p1`." -#: src/memory-management/copy-types.md +#: src/memory-management/copy-types.md:55 #, fuzzy msgid "Show that it works if you clone `p1` instead." msgstr "Arătați că funcționează dacă clonați `p1` în locul lui." -#: src/memory-management/drop.md +#: src/memory-management/drop.md:1 #, fuzzy msgid "The `Drop` Trait" msgstr "Trăsătura `Drop` (cădere)" -#: src/memory-management/drop.md +#: src/memory-management/drop.md:3 #, fuzzy msgid "" "Values which implement [`Drop`](https://doc.rust-lang.org/std/ops/trait.Drop." @@ -8560,52 +9281,61 @@ msgstr "" "Drop.html) pot specifica codul care trebuie executat atunci când ies din " "domeniul de aplicare:" -#: src/memory-management/drop.md +#: src/memory-management/drop.md:13 +#, fuzzy msgid "\"Dropping {}\"" -msgstr "" +msgstr "\"Dropping {}\"" -#: src/memory-management/drop.md src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/memory-management/drop.md:18 +#: src/exercises/concurrency/link-checker.md:85 +#: src/exercises/concurrency/solutions-morning.md:125 +#, fuzzy msgid "\"a\"" -msgstr "" +msgstr "\"a\"" -#: src/memory-management/drop.md src/testing/googletest.md +#: src/memory-management/drop.md:20 src/android/testing/googletest.md:12 +#, fuzzy msgid "\"b\"" -msgstr "" +msgstr "\"b\"" -#: src/memory-management/drop.md +#: src/memory-management/drop.md:22 +#, fuzzy msgid "\"c\"" -msgstr "" +msgstr "\"c\"" -#: src/memory-management/drop.md +#: src/memory-management/drop.md:23 +#, fuzzy msgid "\"d\"" -msgstr "" +msgstr "\"d\"" -#: src/memory-management/drop.md +#: src/memory-management/drop.md:24 +#, fuzzy msgid "\"Exiting block B\"" -msgstr "" +msgstr "\"Ieșirea din blocul B\"" -#: src/memory-management/drop.md +#: src/memory-management/drop.md:26 +#, fuzzy msgid "\"Exiting block A\"" -msgstr "" +msgstr "\"Ieșirea din blocul A\"" -#: src/memory-management/drop.md +#: src/memory-management/drop.md:29 +#, fuzzy msgid "\"Exiting main\"" -msgstr "" +msgstr "\"Ieșire principală\"" -#: src/memory-management/drop.md +#: src/memory-management/drop.md:36 #, fuzzy msgid "Note that `std::mem::drop` is not the same as `std::ops::Drop::drop`." msgstr "" "Rețineți că `std::mem::drop` nu este același lucru cu `std::ops::Drop::drop`." -#: src/memory-management/drop.md +#: src/memory-management/drop.md:37 #, fuzzy msgid "Values are automatically dropped when they go out of scope." msgstr "" "Valorile sunt eliminate automat atunci când ies din domeniul de aplicare." -#: src/memory-management/drop.md +#: src/memory-management/drop.md:38 #, fuzzy msgid "" "When a value is dropped, if it implements `std::ops::Drop` then its `Drop::" @@ -8614,7 +9344,7 @@ msgstr "" "Atunci când o valoare este eliminată, dacă implementează `std::ops::Drop`, " "atunci va fi apelată implementarea `Drop::drop` a acesteia." -#: src/memory-management/drop.md +#: src/memory-management/drop.md:40 #, fuzzy msgid "" "All its fields will then be dropped too, whether or not it implements `Drop`." @@ -8622,7 +9352,7 @@ msgstr "" "Toate câmpurile sale vor fi apoi eliminate, indiferent dacă implementează " "sau nu `Drop`." -#: src/memory-management/drop.md +#: src/memory-management/drop.md:41 #, fuzzy msgid "" "`std::mem::drop` is just an empty function that takes any value. The " @@ -8636,7 +9366,7 @@ msgstr "" "face o modalitate convenabilă de a renunța în mod explicit la valori mai " "devreme decât ar fi ieșit altfel din domeniul de aplicare." -#: src/memory-management/drop.md +#: src/memory-management/drop.md:45 #, fuzzy msgid "" "This can be useful for objects that do some work on `drop`: releasing locks, " @@ -8645,12 +9375,12 @@ msgstr "" "Acest lucru poate fi util pentru obiectele care efectuează anumite " "activități la `drop`: eliberarea de blocaje, închiderea fișierelor etc." -#: src/memory-management/drop.md +#: src/memory-management/drop.md:50 #, fuzzy msgid "Why doesn't `Drop::drop` take `self`?" msgstr "De ce `Drop::drop` nu ia `self`?" -#: src/memory-management/drop.md +#: src/memory-management/drop.md:51 #, fuzzy msgid "" "Short-answer: If it did, `std::mem::drop` would be called at the end of the " @@ -8660,134 +9390,179 @@ msgstr "" "sfârșitul blocului, rezultând un alt apel la `Drop::drop` și o depășire a " "stivei!" -#: src/memory-management/drop.md +#: src/memory-management/drop.md:53 #, fuzzy msgid "Try replacing `drop(a)` with `a.drop()`." msgstr "Încercați să înlocuiți `drop(a)` cu `a.drop()`." -#: src/memory-management/exercise.md +#: src/memory-management/exercise.md:3 +#, fuzzy msgid "" "In this example, we will implement a complex data type that owns all of its " "data. We will use the \"builder pattern\" to support building a new value " "piece-by-piece, using convenience functions." msgstr "" +"În acest exemplu, vom implementa un tip de date complex care deține toate " +"datele sale. Vom utiliza \"modelul de constructor\" pentru a sprijini " +"construirea unei noi valori bucată cu bucată, utilizând funcții de confort." -#: src/memory-management/exercise.md +#: src/memory-management/exercise.md:7 +#, fuzzy msgid "Fill in the missing pieces." -msgstr "" +msgstr "Completați piesele lipsă." -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:22 src/memory-management/solution.md:16 +#, fuzzy msgid "/// A representation of a software package.\n" -msgstr "" +msgstr "/// O reprezentare a unui pachet software.\n" -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:34 src/memory-management/solution.md:28 +#, fuzzy msgid "" "/// Return a representation of this package as a dependency, for use in\n" " /// building other packages.\n" msgstr "" +"/// Returnează o reprezentare a acestui pachet ca dependență, pentru a fi " +"utilizată în\n" +" /// construirea altor pachete.\n" -#: src/memory-management/exercise.md +#: src/memory-management/exercise.md:37 +#, fuzzy msgid "\"1\"" -msgstr "" +msgstr "`dbg_size!(bool)`: dimensiune 1 octet, aliniere: 1 octet," -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:40 src/memory-management/solution.md:37 +#, fuzzy msgid "" "/// A builder for a Package. Use `build()` to create the `Package` itself.\n" msgstr "" +"/// Un constructor pentru un pachet. Utilizați `build()` pentru a crea " +"`Pachet` însuși.\n" -#: src/memory-management/exercise.md +#: src/memory-management/exercise.md:46 +#, fuzzy msgid "\"2\"" msgstr "" +"Același lucru este valabil și pentru ultimul indice, astfel încât `&a[2..a." +"len()]` și `&a[2..]` sunt identice." -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:49 src/memory-management/solution.md:52 +#, fuzzy msgid "/// Set the package version.\n" -msgstr "" +msgstr "/// Setează versiunea pachetului.\n" -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:55 src/memory-management/solution.md:58 +#, fuzzy msgid "/// Set the package authors.\n" -msgstr "" +msgstr "/// Setează autorii pachetului.\n" -#: src/memory-management/exercise.md +#: src/memory-management/exercise.md:57 +#, fuzzy msgid "\"3\"" -msgstr "" +msgstr "Codificați ambele funcții pentru a opera pe matrici 3 × 3." -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:60 src/memory-management/solution.md:64 +#, fuzzy msgid "/// Add an additional dependency.\n" -msgstr "" +msgstr "/// Adăugați o dependență suplimentară.\n" -#: src/memory-management/exercise.md +#: src/memory-management/exercise.md:62 +#, fuzzy msgid "\"4\"" -msgstr "" +msgstr "\"4\"" -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:65 src/memory-management/solution.md:70 +#, fuzzy msgid "/// Set the language. If not set, language defaults to None.\n" -msgstr "" +msgstr "/// Setați limba. Dacă nu este setată, limba este implicită la None.\n" -#: src/memory-management/exercise.md +#: src/memory-management/exercise.md:67 +#, fuzzy msgid "\"5\"" -msgstr "" +msgstr "[Bucle](./control-flow-basics/loops.md) (5 minute)" -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:76 src/memory-management/solution.md:82 +#, fuzzy msgid "\"base64\"" -msgstr "" +msgstr "\"base64\"" -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:76 src/memory-management/solution.md:82 +#, fuzzy msgid "\"0.13\"" -msgstr "" +msgstr "\"0.13\"" -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:77 src/memory-management/solution.md:83 +#, fuzzy msgid "\"base64: {base64:?}\"" -msgstr "" +msgstr "\"base64: {base64:?}\"" -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:79 src/memory-management/solution.md:85 +#, fuzzy msgid "\"log\"" -msgstr "" +msgstr "\"log\"" -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:79 src/memory-management/solution.md:85 +#, fuzzy msgid "\"0.4\"" -msgstr "" +msgstr "\"0.4\"" -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:80 src/memory-management/solution.md:86 +#, fuzzy msgid "\"log: {log:?}\"" -msgstr "" +msgstr "\"log: {log:?}\"" -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:81 src/memory-management/solution.md:87 +#, fuzzy msgid "\"serde\"" -msgstr "" +msgstr "\"serde\"" -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:82 src/memory-management/solution.md:88 +#, fuzzy msgid "\"djmitche\"" -msgstr "" +msgstr "\"djmitche\"" -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:83 src/memory-management/solution.md:89 +#, fuzzy msgid "\"4.0\"" -msgstr "" +msgstr "\"4.0\"" -#: src/memory-management/exercise.md src/memory-management/solution.md +#: src/memory-management/exercise.md:87 src/memory-management/solution.md:93 +#, fuzzy msgid "\"serde: {serde:?}\"" -msgstr "" +msgstr "\"serde: {serde:?}\"" -#: src/memory-management/solution.md +#: src/memory-management/solution.md:45 +#, fuzzy msgid "\"0.1\"" -msgstr "" +msgstr "\"0.1\"" -#: src/smart-pointers.md +#: src/smart-pointers.md:4 +#, fuzzy msgid "[Box" -msgstr "" +msgstr "Cutie (box)" -#: src/smart-pointers.md +#: src/smart-pointers.md:4 +#, fuzzy msgid "](./smart-pointers/box.md) (10 minutes)" -msgstr "" +msgstr "](./smart-pointers/box.md) (10 minute)" -#: src/smart-pointers.md +#: src/smart-pointers.md:5 +#, fuzzy msgid "[Rc](./smart-pointers/rc.md) (5 minutes)" +msgstr "[Rc](./smart-pointers/rc.md) (5 minute)" + +#: src/smart-pointers.md:6 +#, fuzzy +msgid "[Trait Objects](./smart-pointers/trait-objects.md) (10 minutes)" msgstr "" +"[Obiecte de trăsături](./methods-and-traits/trait-objects.md) (10 minute)" -#: src/smart-pointers.md +#: src/smart-pointers.md:7 +#, fuzzy msgid "[Exercise: Binary Tree](./smart-pointers/exercise.md) (30 minutes)" -msgstr "" +msgstr "[Exercițiu: Arbore binar](./smart-pointers/exercise.md) (30 minute)" -#: src/smart-pointers/box.md +#: src/smart-pointers/box.md:3 #, fuzzy msgid "" "[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) is an owned " @@ -8796,11 +9571,12 @@ msgstr "" "[`Box`](https://doc.rust-lang.org/std/boxed/struct.Box.html) este un pointer " "deținut către datele de pe heap:" -#: src/smart-pointers/box.md +#: src/smart-pointers/box.md:9 +#, fuzzy msgid "\"five: {}\"" -msgstr "" +msgstr "\"cinci: {}\"" -#: src/smart-pointers/box.md +#: src/smart-pointers/box.md:26 #, fuzzy msgid "" "`Box` implements `Deref`, which means that you can [call " @@ -8811,7 +9587,7 @@ msgstr "" "[apela metode din `T` direct pe un `Box`](https://doc.rust-lang.org/std/" "ops/trait.Deref.html#more-on-deref-coercion)." -#: src/smart-pointers/box.md +#: src/smart-pointers/box.md:30 #, fuzzy msgid "" "Recursive data types or data types with dynamic sizes need to use a `Box`:" @@ -8819,19 +9595,26 @@ msgstr "" "Tipurile de date recursive sau tipurile de date cu dimensiuni dinamice " "trebuie să utilizeze un `Box`:" -#: src/smart-pointers/box.md +#: src/smart-pointers/box.md:35 +#, fuzzy msgid "/// A non-empty list: first element and the rest of the list.\n" -msgstr "" +msgstr "/// O listă nevidă: primul element și restul listei.\n" -#: src/smart-pointers/box.md +#: src/smart-pointers/box.md:37 +#, fuzzy msgid "/// An empty list.\n" -msgstr "" +msgstr "/// O listă goală.\n" -#: src/smart-pointers/box.md +#: src/smart-pointers/box.md:44 +#, fuzzy msgid "\"{list:?}\"" msgstr "" +"[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial." +"github.io/too-many-lists/): explorarea în profunzime a regulilor de " +"gestionare a memoriei din Rust, prin implementarea câtorva tipuri diferite " +"de structuri de liste." -#: src/smart-pointers/box.md +#: src/smart-pointers/box.md:48 #, fuzzy msgid "" "```bob\n" @@ -8869,7 +9652,7 @@ msgstr "" "-'\n" "```" -#: src/smart-pointers/box.md +#: src/smart-pointers/box.md:64 #, fuzzy msgid "" "`Box` is like `std::unique_ptr` in C++, except that it's guaranteed to be " @@ -8878,12 +9661,12 @@ msgstr "" "`Box` este ca și `std::unique_ptr` în C++, cu excepția faptului că este " "garantat a nu fi nul." -#: src/smart-pointers/box.md +#: src/smart-pointers/box.md:66 #, fuzzy msgid "A `Box` can be useful when you:" msgstr "Un `Box` poate fi util atunci când:" -#: src/smart-pointers/box.md +#: src/smart-pointers/box.md:67 #, fuzzy msgid "" "have a type whose size that can't be known at compile time, but the Rust " @@ -8892,7 +9675,7 @@ msgstr "" "au un tip a cărui dimensiune nu poate fi cunoscută la compilare, dar " "compilatorul Rust dorește să știe o dimensiune exactă." -#: src/smart-pointers/box.md +#: src/smart-pointers/box.md:69 #, fuzzy msgid "" "want to transfer ownership of a large amount of data. To avoid copying large " @@ -8904,18 +9687,18 @@ msgstr "" "schimb datele pe heap într-un `Box`, astfel încât să fie mutat doar " "pointerul." -#: src/smart-pointers/box.md +#: src/smart-pointers/box.md:73 #, fuzzy msgid "" "If `Box` was not used and we attempted to embed a `List` directly into the " -"`List`, the compiler would not compute a fixed size of the struct in memory " -"(`List` would be of infinite size)." +"`List`, the compiler would not be able to compute a fixed size for the " +"struct in memory (the `List` would be of infinite size)." msgstr "" "Dacă nu se folosea `Box` și încercam să încorporăm o `List` direct în " "`List`, compilatorul nu ar fi calculat o dimensiune fixă a structurii în " "memorie (`List` ar fi avut o dimensiune infinită)." -#: src/smart-pointers/box.md +#: src/smart-pointers/box.md:77 #, fuzzy msgid "" "`Box` solves this problem as it has the same size as a regular pointer and " @@ -8924,64 +9707,60 @@ msgstr "" "`Box` rezolvă această problemă, deoarece are aceeași dimensiune ca un " "pointer obișnuit și indică doar următorul element din `List` în heap." -#: src/smart-pointers/box.md +#: src/smart-pointers/box.md:80 #, fuzzy msgid "" -"Remove the `Box` in the List definition and show the compiler error. " -"\"Recursive with indirection\" is a hint you might want to use a Box or " -"reference of some kind, instead of storing a value directly." +"Remove the `Box` in the List definition and show the compiler error. We get " +"the message \"recursive without indirection\", because for data recursion, " +"we have to use indirection, a `Box` or reference of some kind, instead of " +"storing the value directly." msgstr "" "Eliminați `Box` din definiția Listei și afișați eroarea de compilare. " "\"Recursiv cu indirecție\" este un indiciu că poate doriți să folosiți un " "Box sau o referință de un anumit tip, în loc să stocați direct o valoare." -#: src/smart-pointers/box.md +#: src/smart-pointers/box.md:87 msgid "Niche Optimization" msgstr "Optimizari de nișă" -#: src/smart-pointers/box.md -#, fuzzy +#: src/smart-pointers/box.md:89 msgid "" -"A `Box` cannot be empty, so the pointer is always valid and non-`null`. This " -"allows the compiler to optimize the memory layout:" +"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 "" -"Un `Box` nu poate fi gol, astfel încât pointerul este întotdeauna valid și " -"non-`null`. Acest lucru permite compilatorului să optimizeze dispunerea " -"memoriei:" -#: src/smart-pointers/box.md -#, fuzzy +#: src/smart-pointers/box.md:93 msgid "" -"```bob\n" -" Stack Heap\n" -".- - - - - - - - - - - - - - . .- - - - - - - - - - - - - -.\n" -": : : :\n" -": list : : :\n" -": +---------+----+----+ : : +---------+----+----+ :\n" -": | Element | 1 | o--+----+-----+--->| Element | 2 | // | :\n" -": +---------+----+----+ : : +---------+----+----+ :\n" -": : : :\n" -": : : :\n" -"'- - - - - - - - - - - - - - ' '- - - - - - - - - - - - - -'\n" -"```" +"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:103 +msgid "\"Just box\"" +msgstr "" + +#: src/smart-pointers/box.md:105 +#, fuzzy +msgid "\"Optional box\"" +msgstr "Opțiune" + +#: src/smart-pointers/box.md:111 +msgid "\"Size of just_box: {}\"" msgstr "" -"```bob\n" -" Stiva Heap\n" -".- - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - - - - - - " -"-.\n" -": : : :\n" -": listă : : : :\n" -": +------+----+----+ : : +------+----+----+ +------+----+----+ :\n" -": | Cons | 1 | o--+----+-----+--->| Cons | 2 | o--++--->| Nil | // | // // " -"| :\n" -": +------+----+----+ : : +------+----+----+ +------+----+----+ :\n" -": : : :\n" -": : : :\n" -"'- - - - - - - - - - - - -' '- - - - - - - - - - - - - - - - - - - - - - - " -"-'\n" -"```" -#: src/smart-pointers/rc.md +#: src/smart-pointers/box.md:112 +msgid "\"Size of optional_box: {}\"" +msgstr "" + +#: src/smart-pointers/box.md:113 +#, fuzzy +msgid "\"Size of none: {}\"" +msgstr "“înainte: {a}”" + +#: src/smart-pointers/rc.md:3 #, fuzzy msgid "" "[`Rc`](https://doc.rust-lang.org/std/rc/struct.Rc.html) is a reference-" @@ -8992,15 +9771,17 @@ msgstr "" "partajat cu numărătoare de referințe. Folosiți-l atunci când trebuie să " "faceți referire la aceleași date din mai multe locuri:" -#: src/smart-pointers/rc.md +#: src/smart-pointers/rc.md:13 +#, fuzzy msgid "\"a: {a}\"" -msgstr "" +msgstr "\"a: {a}\"" -#: src/smart-pointers/rc.md +#: src/smart-pointers/rc.md:14 +#, fuzzy msgid "\"b: {b}\"" -msgstr "" +msgstr "\"b: {b}\"" -#: src/smart-pointers/rc.md +#: src/smart-pointers/rc.md:18 #, fuzzy msgid "" "See [`Arc`](../concurrency/shared_state/arc.md) and [`Mutex`](https://doc." @@ -9011,7 +9792,7 @@ msgstr "" "doc.rust-lang.org/std/sync/struct.Mutex.html) dacă vă aflați într-un context " "cu mai multe fire." -#: src/smart-pointers/rc.md +#: src/smart-pointers/rc.md:19 #, fuzzy msgid "" "You can _downgrade_ a shared pointer into a [`Weak`](https://doc.rust-lang." @@ -9021,7 +9802,7 @@ msgstr "" "rust-lang.org/std/rc/struct.Weak.html) pentru a crea cicluri care vor fi " "abandonate." -#: src/smart-pointers/rc.md +#: src/smart-pointers/rc.md:30 #, fuzzy msgid "" "`Rc`'s count ensures that its contained value is valid for as long as there " @@ -9030,12 +9811,12 @@ msgstr "" "numărătoarea lui `Rc` asigură că valoarea sa conținută este valabilă atâta " "timp cât există referințe." -#: src/smart-pointers/rc.md +#: src/smart-pointers/rc.md:32 #, fuzzy msgid "`Rc` in Rust is like `std::shared_ptr` in C++." msgstr "`Rc` în Rust este ca `std::shared_ptr` în C++." -#: src/smart-pointers/rc.md +#: src/smart-pointers/rc.md:33 #, fuzzy msgid "" "`Rc::clone` is cheap: it creates a pointer to the same allocation and " @@ -9046,7 +9827,7 @@ msgstr "" "numărul de referințe. Nu realizează o clonă profundă și poate fi în general " "ignorată atunci când se caută probleme de performanță în cod." -#: src/smart-pointers/rc.md +#: src/smart-pointers/rc.md:36 #, fuzzy msgid "" "`make_mut` actually clones the inner value if necessary (\"clone-on-write\") " @@ -9055,12 +9836,12 @@ msgstr "" "`make_mut` clonează de fapt valoarea interioară dacă este necesar (\"clone-" "on-write\") și returnează o referință mutabilă." -#: src/smart-pointers/rc.md +#: src/smart-pointers/rc.md:38 #, fuzzy msgid "Use `Rc::strong_count` to check the reference count." msgstr "Utilizați `Rc::strong_count` pentru a verifica numărul de referințe." -#: src/smart-pointers/rc.md +#: src/smart-pointers/rc.md:39 #, fuzzy msgid "" "`Rc::downgrade` gives you a _weakly reference-counted_ object to create " @@ -9070,86 +9851,290 @@ msgstr "" "crea cicluri care vor fi abandonate în mod corespunzător (probabil în " "combinație cu `RefCell`, pe slide-ul următor)." -#: src/smart-pointers/exercise.md +#: src/smart-pointers/trait-objects.md:3 +#, fuzzy +msgid "" +"Trait objects allow for values of different types, for instance in a " +"collection:" +msgstr "" +"Obiectele de trăsături permit valori de diferite tipuri, de exemplu într-o " +"colecție:" + +#: src/smart-pointers/trait-objects.md:26 +#, fuzzy +msgid "\"Miau!\"" +msgstr "\"Miau!\"" + +#: src/smart-pointers/trait-objects.md:36 +#, fuzzy +msgid "\"Hello, who are you? {}\"" +msgstr "\"Bună ziua, cine ești? {}\"" + +#: src/smart-pointers/trait-objects.md:41 +#, fuzzy +msgid "Memory layout after allocating `pets`:" +msgstr "Dispunerea memoriei după alocarea `pets`:" + +#: src/smart-pointers/trait-objects.md:43 +#, fuzzy +msgid "" +"```bob\n" +" Stack Heap\n" +".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - - - - " +"- -.\n" +": : : :\n" +": \"pets: Vec\" : : \"data: Cat\" +----+----+----" +"+----+ :\n" +": +-----------+-------+ : : +-------+-------+ | F | i | d | " +"o | :\n" +": | ptr | o---+---+--. : | lives | 9 | +----+----+----" +"+----+ :\n" +": | len | 2 | : | : +-------+-------+ " +"^ :\n" +": | capacity | 2 | : | : ^ " +"| :\n" +": +-----------+-------+ : | : | " +"'-------. :\n" +": : | : | data:" +"\"Dog\"| :\n" +": : | : | +-------+--|-------" +"+ :\n" +"`- - - - - - - - - - - - - -' | : +---|-+-----+ | name | o, 4, 4 " +"| :\n" +" `--+-->| o o | o o-|----->| age | 5 " +"| :\n" +" : +-|---+-|---+ +-------+----------" +"+ :\n" +" : | " +"| :\n" +" `- - -| - - |- - - - - - - - - - - - - - - " +"- -'\n" +" | |\n" +" | | " +"\"Program text\"\n" +" .- - -| - - |- - - - - - - - - - - - - - - " +"- -.\n" +" : | | " +"vtable :\n" +" : | | +----------------------" +"+ :\n" +" : | `----->| \"::" +"talk\" | :\n" +" : | +----------------------" +"+ :\n" +" : | " +"vtable :\n" +" : | +----------------------" +"+ :\n" +" : '----------->| \"::" +"talk\" | :\n" +" : +----------------------" +"+ :\n" +" : :\n" +" '- - - - - - - - - - - - - - - - - - - - - " +"- -'\n" +"```" +msgstr "" +"```bob\n" +" Stiva Heap\n" +".- - - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - - - - - " +"-.\n" +": : : :\n" +": animale de companie : : : +----+----+----+----+----+ :\n" +": +-----------+-------+ : : : +-----+-----+ .->| F | i | d | o | :\n" +": | ptr | o---++-+-+-----+-->| o o | o o | o o | | | +----+----+----" +"+----+----+ :\n" +": | len | 2 | : : : +-|-|-|-+-|-|-|-+ `---------. :\n" +": | capacitate | 2 | : : | | | | | | date | :\n" +": +-----------+-------+ : : | | | | +-------+--|-------+ :\n" +": : : | | | | '-->|| nume | o, 4, 4 | :\n" +": : : | | | | | vârstă | 5 | :\n" +"`- - - - - - - - - - - - - -' : | | | +-------+----------+ :\n" +" : | | | :\n" +" : | | | | vtable :\n" +" : | | | +----------------------+ :\n" +" : | | '---->| \"::" +"talk\" | :\n" +" : | | +----------------------+ :\n" +" : | | :\n" +" : | | date :\n" +" : | | +-------+-------+ :\n" +" : | '-->| vieți | 9 | :\n" +" : | +-------+-------+ :\n" +" : | :\n" +" : | vtable :\n" +" : | +----------------------+ :\n" +" : '---->|| \"::talk\" | :\n" +" : +----------------------+ :\n" +" : :\n" +" '- - - - - - - - - - - - - - - - - - - - - " +"- -'\n" +"```" + +#: src/smart-pointers/trait-objects.md:78 +#, fuzzy +msgid "" +"Types that implement a given trait may be of different sizes. This makes it " +"impossible to have things like `Vec` in the example above." +msgstr "" +"Tipurile care implementează o anumită trăsătură pot avea dimensiuni " +"diferite. Acest lucru face imposibilă existența unor lucruri precum `Vec` în exemplul de mai sus." + +#: src/smart-pointers/trait-objects.md:80 +#, fuzzy +msgid "" +"`dyn Pet` is a way to tell the compiler about a dynamically sized type that " +"implements `Pet`." +msgstr "" +"`dyn Pet` este o modalitate de a indica compilatorului un tip dimensionat " +"dinamic care implementează `Pet`." + +#: src/smart-pointers/trait-objects.md:82 +#, fuzzy +msgid "" +"In the example, `pets` is allocated on the stack and the vector data is on " +"the heap. The two vector elements are _fat pointers_:" +msgstr "" +"În acest exemplu, `pets` este alocat pe stivă, iar datele vectorului se află " +"pe heap. Cele două elemente ale vectorului sunt _fat pointeri_:" + +#: src/smart-pointers/trait-objects.md:84 +#, fuzzy +msgid "" +"A fat pointer is a double-width pointer. It has two components: a pointer to " +"the actual object and a pointer to the [virtual method table](https://en." +"wikipedia.org/wiki/Virtual_method_table) (vtable) for the `Pet` " +"implementation of that particular object." +msgstr "" +"Un pointer gras este un pointer cu lățime dublă. Acesta are două componente: " +"un pointer la obiectul real și un pointer la [virtual method table](https://" +"en.wikipedia.org/wiki/Virtual_method_table) (vtable) pentru implementarea " +"`Pet` a obiectului respectiv." + +#: src/smart-pointers/trait-objects.md:87 +#, fuzzy +msgid "" +"The data for the `Dog` named Fido is the `name` and `age` fields. The `Cat` " +"has a `lives` field." +msgstr "" +"Datele pentru `Dog` numit Fido sunt câmpurile `name` și `age`. Pentru `Cat` " +"există un câmp `lives`." + +#: src/smart-pointers/trait-objects.md:89 +#, fuzzy +msgid "Compare these outputs in the above example:" +msgstr "Comparați aceste ieșiri în exemplul de mai sus:" + +#: src/smart-pointers/exercise.md:3 +#, fuzzy msgid "" "A binary tree is a tree-type data structure where every node has two " "children (left and right). We will create a tree where each node stores a " "value. For a given node N, all nodes in a N's left subtree contain smaller " "values, and all nodes in N's right subtree will contain larger values." msgstr "" +"Un arbore binar este o structură de date de tip arbore în care fiecare nod " +"are doi copii (stânga și dreapta). Vom crea un arbore în care fiecare nod " +"stochează o valoare. Pentru un anumit nod N, toate nodurile din subarborele " +"stâng al lui N conțin valori mai mici, iar toate nodurile din subarborele " +"drept al lui N vor conține valori mai mari." -#: src/smart-pointers/exercise.md +#: src/smart-pointers/exercise.md:8 +#, fuzzy msgid "Implement the following types, so that the given tests pass." -msgstr "" +msgstr "Implementați următoarele tipuri, astfel încât testele date să treacă." -#: src/smart-pointers/exercise.md +#: src/smart-pointers/exercise.md:10 +#, fuzzy msgid "" "Extra Credit: implement an iterator over a binary tree that returns the " "values in order." msgstr "" +"Credit suplimentar: implementați un iterator pe un arbore binar care " +"returnează valorile în ordine." -#: src/smart-pointers/exercise.md src/smart-pointers/solution.md +#: src/smart-pointers/exercise.md:14 src/smart-pointers/solution.md:5 +#, fuzzy msgid "/// A node in the binary tree.\n" -msgstr "" +msgstr "/// Un nod în arborele binar.\n" -#: src/smart-pointers/exercise.md src/smart-pointers/solution.md +#: src/smart-pointers/exercise.md:21 src/smart-pointers/solution.md:13 +#, fuzzy msgid "/// A possibly-empty subtree.\n" -msgstr "" +msgstr "/// Un subarbore posibil gol.\n" -#: src/smart-pointers/exercise.md src/smart-pointers/solution.md +#: src/smart-pointers/exercise.md:25 src/smart-pointers/solution.md:17 +#, fuzzy msgid "" "/// A container storing a set of values, using a binary tree.\n" "///\n" "/// If the same value is added multiple times, it is only stored once.\n" msgstr "" +"/// Un container care stochează un set de valori, utilizând un arbore " +"binar.\n" +"///\n" +"/// În cazul în care aceeași valoare este adăugată de mai multe ori, aceasta " +"este stocată o singură dată.\n" -#: src/smart-pointers/exercise.md +#: src/smart-pointers/exercise.md:33 +#, fuzzy msgid "// Implement `new`, `insert`, `len`, and `has`.\n" -msgstr "" +msgstr "// Implementați `new`, `insert`, `len` și `has`.\n" -#: src/smart-pointers/exercise.md src/smart-pointers/solution.md +#: src/smart-pointers/exercise.md:48 src/smart-pointers/solution.md:105 +#, fuzzy msgid "// not a unique item\n" -msgstr "" +msgstr "// nu este un element unic\n" -#: src/smart-pointers/solution.md src/testing/googletest.md +#: src/smart-pointers/solution.md:89 src/android/testing/googletest.md:11 +#, fuzzy msgid "\"bar\"" -msgstr "" +msgstr "\"bar\"" -#: src/welcome-day-3-afternoon.md +#: src/welcome-day-3-afternoon.md:4 #, fuzzy -msgid "[Borrowing](./borrowing.md) (1 hour)" -msgstr "" -"împrumut:\n" -"A se vedea [Împrumut](ownership/borrowing.md)." +msgid "[Borrowing](./borrowing.md) (50 minutes)" +msgstr "[Împrumut](../împrumut.md) (1 oră)" -#: src/welcome-day-3-afternoon.md -msgid "" -"[Slices and Lifetimes](./slices-and-lifetimes.md) (1 hour and 10 minutes)" -msgstr "" +#: src/welcome-day-3-afternoon.md:5 +#, fuzzy +msgid "[Lifetimes](./lifetimes.md) (50 minutes)" +msgstr "[Referințe](../references.md) (50 minute)" -#: src/welcome-day-3-afternoon.md +#: src/welcome-day-3-afternoon.md:7 +#, fuzzy msgid "" -"Including 10 minute breaks, this session should take about 2 hours and 20 " +"Including 10 minute breaks, this session should take about 1 hour and 50 " "minutes" msgstr "" +"Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze " +"aproximativ 3 ore și 5 minute" -#: src/borrowing.md +#: src/borrowing.md:4 +#, fuzzy msgid "[Borrowing a Value](./borrowing/shared.md) (10 minutes)" -msgstr "" +msgstr "[Împrumutând o valoare](./împrumut/împărtășit.md) (10 minute)" -#: src/borrowing.md +#: src/borrowing.md:5 +#, fuzzy msgid "[Borrow Checking](./borrowing/borrowck.md) (10 minutes)" -msgstr "" +msgstr "[Verificarea împrumutului](./împrumut/împrumutck.md) (10 minute)" -#: src/borrowing.md +#: src/borrowing.md:6 +#, fuzzy msgid "[Interior Mutability](./borrowing/interior-mutability.md) (10 minutes)" msgstr "" +"[Mutabilitatea interioară](./împrumut/interior-mutability.md) (10 minute)" -#: src/borrowing.md -msgid "[Exercise: Health Statistics](./borrowing/exercise.md) (30 minutes)" +#: src/borrowing.md:7 +#, fuzzy +msgid "[Exercise: Health Statistics](./borrowing/exercise.md) (20 minutes)" msgstr "" +"[Exercițiu: Statistici în domeniul sănătății](./împrumut/exercițiu.md) (30 " +"minute)" -#: src/borrowing/shared.md +#: src/borrowing/shared.md:3 #, fuzzy msgid "" "As we saw before, instead of transferring ownership when calling a function, " @@ -9158,28 +10143,32 @@ msgstr "" "În loc să transferați proprietatea atunci când apelați o funcție, puteți " "lăsa o funcție să _împrumute_ valoarea:" -#: src/borrowing/shared.md +#: src/borrowing/shared.md:24 #, fuzzy msgid "The `add` function _borrows_ two points and returns a new point." msgstr "Funcția `add` adună două puncte și returnează un nou punct." -#: src/borrowing/shared.md +#: src/borrowing/shared.md:25 #, fuzzy msgid "The caller retains ownership of the inputs." msgstr "Apelantul păstrează dreptul de proprietate asupra intrărilor." -#: src/borrowing/shared.md +#: src/borrowing/shared.md:30 +#, fuzzy msgid "" "This slide is a review of the material on references from day 1, expanding " "slightly to include function arguments and return values." msgstr "" +"Acest diapozitiv reprezintă o revizuire a materialului despre referințe din " +"ziua 1, cu o ușoară extindere pentru a include argumentele funcțiilor și " +"valorile de returnare." -#: src/borrowing/shared.md +#: src/borrowing/shared.md:35 #, fuzzy msgid "Notes on stack returns:" msgstr "Note privind returnările de stivă:" -#: src/borrowing/shared.md +#: src/borrowing/shared.md:37 #, fuzzy msgid "" "Demonstrate that the return from `add` is cheap because the compiler can " @@ -9197,12 +10186,12 @@ msgstr "" "nivelul de optimizare \"DEBUG\", adresele ar trebui să se schimbe, în timp " "ce ele rămân aceleași atunci când treceți la setarea \"RELEASE\":" -#: src/borrowing/shared.md +#: src/borrowing/shared.md:63 #, fuzzy msgid "The Rust compiler can do return value optimization (RVO)." msgstr "Compilatorul Rust poate face optimizarea valorii de returnare (RVO)." -#: src/borrowing/shared.md +#: src/borrowing/shared.md:64 #, fuzzy msgid "" "In C++, copy elision has to be defined in the language specification because " @@ -9215,7 +10204,7 @@ msgstr "" "reprezintă deloc o problemă. Dacă RVO nu a avut loc, Rust va efectua " "întotdeauna o copie `memcpy` simplă și eficientă." -#: src/borrowing/borrowck.md +#: src/borrowing/borrowck.md:3 #, fuzzy msgid "" "Rust's _borrow checker_ puts constraints on the ways you can borrow values. " @@ -9224,23 +10213,26 @@ msgstr "" "Rust impune constrângeri asupra modalităților în care puteți împrumuta " "valori:" -#: src/borrowing/borrowck.md +#: src/borrowing/borrowck.md:6 #, fuzzy msgid "You can have one or more shared references to the value, _or_" msgstr "Puteți avea una sau mai multe valori `&T` la un moment dat, _sau_" -#: src/borrowing/borrowck.md +#: src/borrowing/borrowck.md:7 #, fuzzy msgid "You can have exactly one exclusive reference to the value." msgstr "Puteți avea exact o singură valoare `&mut T`." -#: src/borrowing/borrowck.md +#: src/borrowing/borrowck.md:29 +#, fuzzy msgid "" "Note that the requirement is that conflicting references not _exist_ at the " "same point. It does not matter where the reference is dereferenced." msgstr "" +"Rețineți că cerința este ca referințele conflictuale să nu _existe_ în " +"același punct. Nu contează unde este dereferențiată referința." -#: src/borrowing/borrowck.md +#: src/borrowing/borrowck.md:31 #, fuzzy msgid "" "The above code does not compile because `a` is borrowed as mutable (through " @@ -9249,7 +10241,7 @@ msgstr "" "Codul de mai sus nu se compilează pentru că `a` este împrumutat ca mutabil " "(prin `c`) și ca imuabil (prin `b`) în același timp." -#: src/borrowing/borrowck.md +#: src/borrowing/borrowck.md:33 #, fuzzy msgid "" "Move the `println!` statement for `b` before the scope that introduces `c` " @@ -9258,7 +10250,7 @@ msgstr "" "Mutați instrucțiunea `println!` pentru `b` înainte de domeniul de aplicare " "care introduce `c` pentru a face codul să fie compilat." -#: src/borrowing/borrowck.md +#: src/borrowing/borrowck.md:35 #, fuzzy msgid "" "After that change, the compiler realizes that `b` is only ever used before " @@ -9270,91 +10262,139 @@ msgstr "" "caracteristică a verificatorului de împrumuturi numită \"durate de viață non-" "lexicale\"." -#: src/borrowing/borrowck.md +#: src/borrowing/borrowck.md:38 +#, fuzzy 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." msgstr "" +"Constrângerea de referință exclusivă este destul de puternică. Rust o " +"folosește pentru a se asigura că nu se produc curse de date. De asemenea, " +"Rust se bazează pe această constrângere pentru a optimiza codul. De exemplu, " +"o valoare din spatele unei referințe partajate poate fi stocată în siguranță " +"într-un registru pe durata de viață a referinței respective." -#: src/borrowing/borrowck.md +#: src/borrowing/borrowck.md:42 +#, fuzzy 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.\"" msgstr "" +"Verificatorul de împrumuturi este conceput pentru a se adapta la multe " +"modele comune, cum ar fi preluarea de referințe exclusive la diferite " +"câmpuri dintr-o structură în același timp. Dar, există unele situații în " +"care nu prea \"înțelege\", ceea ce duce adesea la \"lupta cu verificatorul " +"de împrumuturi\"" -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability.md:3 +#, fuzzy 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 "" +"În unele situații, este necesar să se modifice datele din spatele unei " +"referințe partajate (numai pentru citire). De exemplu, o structură de date " +"partajată ar putea avea o memorie cache internă și ar putea dori să " +"actualizeze această memorie cache prin metode numai pentru citire." -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability.md:7 +#, fuzzy 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 "" +"Modelul \"mutabilității interioare\" permite accesul exclusiv (mutabil) în " +"spatele unei referințe partajate. Biblioteca standard oferă mai multe " +"modalități de a face acest lucru, toate asigurând în același timp siguranța, " +"de obicei prin efectuarea unei verificări în timpul execuției." -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability.md:11 #, fuzzy msgid "`RefCell`" -msgstr "`RefCell`" +msgstr "Celula/RefCell" -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability.md:41 +#, fuzzy msgid "\"graph: {root:#?}\"" -msgstr "" +msgstr "\"grafic: {root:#?}\"" -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability.md:42 +#, fuzzy msgid "\"graph sum: {}\"" -msgstr "" +msgstr "\"suma grafică: {}\"" -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability.md:46 #, fuzzy msgid "`Cell`" msgstr "`Celula`" -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability.md:48 +#, fuzzy 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." msgstr "" +"`Cell` înfășoară o valoare și permite obținerea sau stabilirea valorii, " +"chiar și cu o referință partajată la `Cell`. Cu toate acestea, nu permite " +"referințe la valoarea respectivă. Deoarece nu există referințe, regulile de " +"împrumut nu pot fi încălcate." -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability.md:55 +#, fuzzy 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 "" +"Principalul lucru care trebuie reținut din acest diapozitiv este că Rust " +"oferă modalități _sigure_ de a modifica datele din spatele unei referințe " +"partajate. Există o varietate de moduri de a asigura această siguranță, iar " +"`RefCell` și `Cell` sunt două dintre ele." -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability.md:59 +#, fuzzy msgid "" "`RefCell` enforces Rust's usual borrowing rules (either multiple shared " "references or a single exclusive reference) with a runtime check. In this " "case, all borrows are very short and never overlap, so the checks always " "succeed." msgstr "" +"`RefCell` aplică regulile obișnuite de împrumut din Rust (fie mai multe " +"referințe partajate, fie o singură referință exclusivă) cu o verificare în " +"timpul execuției. În acest caz, toate împrumuturile sunt foarte scurte și nu " +"se suprapun niciodată, astfel încât verificările reușesc întotdeauna." -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability.md:64 +#, fuzzy 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." msgstr "" +"`Rc` permite doar accesul partajat (numai pentru citire) la conținutul său, " +"deoarece scopul său este de a permite (și de a număra) multe referințe. Dar " +"noi vrem să modificăm valoarea, așa că avem nevoie de mutabilitate " +"interioară." -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability.md:68 +#, fuzzy 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." msgstr "" +"`Cell` este un mijloc mai simplu de a asigura siguranța: are o metodă `set` " +"care ia `&self`. Acest lucru nu necesită o verificare în timpul execuției, " +"dar necesită mutarea valorilor, ceea ce poate avea propriile costuri." -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability.md:72 #, fuzzy msgid "" "Demonstrate that reference loops can be created by adding `root` to `subtree." @@ -9363,7 +10403,7 @@ msgstr "" "Demonstrați că buclele de referință pot fi create prin adăugarea lui `root` " "la `subtree.children` (nu încercați să le imprimați!)." -#: src/borrowing/interior-mutability.md +#: src/borrowing/interior-mutability.md:75 #, fuzzy msgid "" "To demonstrate a runtime panic, add a `fn inc(&mut self)` that increments " @@ -9376,7 +10416,7 @@ msgstr "" "săi. Aceasta va intra în panică în prezența buclei de referință, cu `thread-" "ul `main` panicat la `ready loaned: BorrowMutError'`." -#: src/borrowing/exercise.md +#: src/borrowing/exercise.md:3 #, fuzzy msgid "" "You're working on implementing a health-monitoring system. As part of that, " @@ -9386,7 +10426,7 @@ msgstr "" "acestuia, trebuie să țineți evidența statisticilor de sănătate ale " "utilizatorilor." -#: src/borrowing/exercise.md +#: src/borrowing/exercise.md:6 #, fuzzy msgid "" "You'll start with a stubbed function in an `impl` block as well as a `User` " @@ -9397,7 +10437,7 @@ msgstr "" "definiție a structurii `User`. Scopul dumneavoastră este de a implementa " "metodele stubbed out pe `struct` `User` definită în blocul `impl`." -#: src/borrowing/exercise.md +#: src/borrowing/exercise.md:10 #, fuzzy msgid "" "Copy the code below to and fill in the missing " @@ -9406,265 +10446,81 @@ msgstr "" "Copiați codul de mai jos în și completați " "metodele lipsă:" -#: src/borrowing/exercise.md +#: src/borrowing/exercise.md:45 +#, fuzzy msgid "" "\"Update a user's statistics based on measurements from a visit to the " "doctor\"" msgstr "" +"\"Actualizați statisticile unui utilizator pe baza măsurătorilor de la o " +"vizită la medic\"" -#: src/borrowing/exercise.md src/borrowing/solution.md -#: src/android/build-rules/library.md src/android/aidl/client.md -msgid "\"Bob\"" -msgstr "" - -#: src/borrowing/exercise.md src/borrowing/solution.md -msgid "\"I'm {} and my age is {}\"" -msgstr "" - -#: src/slices-and-lifetimes.md -msgid "[Slices: &\\[T\\]](./slices-and-lifetimes/slices.md) (10 minutes)" -msgstr "" - -#: src/slices-and-lifetimes.md -msgid "[String References](./slices-and-lifetimes/str.md) (10 minutes)" -msgstr "" - -#: src/slices-and-lifetimes.md -msgid "" -"[Lifetime Annotations](./slices-and-lifetimes/lifetime-annotations.md) (10 " -"minutes)" -msgstr "" - -#: src/slices-and-lifetimes.md -msgid "" -"[Lifetime Elision](./slices-and-lifetimes/lifetime-elision.md) (5 minutes)" -msgstr "" - -#: src/slices-and-lifetimes.md -msgid "" -"[Struct Lifetimes](./slices-and-lifetimes/struct-lifetimes.md) (5 minutes)" -msgstr "" - -#: src/slices-and-lifetimes.md -msgid "" -"[Exercise: Protobuf Parsing](./slices-and-lifetimes/exercise.md) (30 minutes)" -msgstr "" - -#: src/slices-and-lifetimes/slices.md -msgid "Slices" -msgstr "Felii" - -#: src/slices-and-lifetimes/slices.md -#, fuzzy -msgid "A slice gives you a view into a larger collection:" -msgstr "O felie vă oferă o imagine a unei colecții mai mari:" - -#: src/slices-and-lifetimes/slices.md -#, fuzzy -msgid "Slices borrow data from the sliced type." -msgstr "Felii împrumută date din tipul feliat." - -#: src/slices-and-lifetimes/slices.md -#, fuzzy -msgid "Question: What happens if you modify `a[3]` right before printing `s`?" -msgstr "" -"Întrebare: Ce se întâmplă dacă modificați `a[3]` chiar înainte de a imprima " -"`s`?" - -#: src/slices-and-lifetimes/slices.md +#: src/borrowing/exercise.md:50 src/borrowing/exercise.md:56 +#: src/borrowing/exercise.md:60 src/borrowing/solution.md:52 +#: src/borrowing/solution.md:58 src/borrowing/solution.md:62 +#: src/android/build-rules/library.md:44 +#: src/android/aidl/example-service/client.md:15 #, fuzzy -msgid "" -"We create a slice by borrowing `a` and specifying the starting and ending " -"indexes in brackets." -msgstr "" -"Creăm o felie prin împrumutarea lui `a` și specificarea indicilor de început " -"și de sfârșit între paranteze." - -#: src/slices-and-lifetimes/slices.md -#, fuzzy -msgid "" -"If the slice starts at index 0, Rust’s range syntax allows us to drop the " -"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are " -"identical." -msgstr "" -"Dacă felia începe la indexul 0, sintaxa intervalului din Rust ne permite să " -"renunțăm la indexul de pornire, ceea ce înseamnă că `&a[0..a.len()]` și " -"`&a[..a.len()]` sunt identice." - -#: src/slices-and-lifetimes/slices.md -#, fuzzy -msgid "" -"The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are " -"identical." -msgstr "" -"Același lucru este valabil și pentru ultimul indice, astfel încât `&a[2..a." -"len()]` și `&a[2..]` sunt identice." - -#: src/slices-and-lifetimes/slices.md -#, fuzzy -msgid "" -"To easily create a slice of the full array, we can therefore use `&a[..]`." -msgstr "" -"Pentru a crea cu ușurință o porțiune din întregul tablou, putem folosi " -"`&a[...]`." - -#: src/slices-and-lifetimes/slices.md -#, fuzzy -msgid "" -"`s` is a reference to a slice of `i32`s. Notice that the type of `s` " -"(`&[i32]`) no longer mentions the array length. This allows us to perform " -"computation on slices of different sizes." -msgstr "" -"`s` este o referință la o felie de `i32`s. Observați că tipul lui `s` " -"(`&[i32]`) nu mai menționează lungimea matricei. Acest lucru ne permite să " -"efectuăm calcule pe felii de dimensiuni diferite." - -#: src/slices-and-lifetimes/slices.md -#, fuzzy -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 "" -"Feliile împrumută întotdeauna de la un alt obiect. În acest exemplu, `a` " -"trebuie să rămână \"în viață\" (în domeniul de aplicare) cel puțin atâta " -"timp cât slice-ul nostru." - -#: src/slices-and-lifetimes/slices.md -#, fuzzy -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 "" -"Întrebarea despre modificarea lui `a[3]` poate stârni o discuție " -"interesantă, dar răspunsul este că, din motive de siguranță a memoriei, nu " -"se poate face acest lucru prin `a` în acest moment al execuției, dar se pot " -"citi datele atât din `a`, cât și din `s` în siguranță. Funcționează înainte " -"de a crea slice-ul și din nou după `println`, când slice-ul nu mai este " -"utilizat. Mai multe detalii vor fi explicate în secțiunea de verificare a " -"împrumuturilor." - -#: src/slices-and-lifetimes/str.md -msgid "" -"We can now understand the two string types in Rust: `&str` is almost like " -"`&[char]`, but with its data stored in a variable-length encoding (UTF-8)." -msgstr "" - -#: src/slices-and-lifetimes/str.md -msgid "\"s1: {s1}\"" -msgstr "" - -#: src/slices-and-lifetimes/str.md -#, fuzzy -msgid "\"Hello \"" -msgstr "Bună lume!" - -#: src/slices-and-lifetimes/str.md -msgid "\"s3: {s3}\"" -msgstr "" - -#: src/slices-and-lifetimes/str.md -#, fuzzy -msgid "Rust terminology:" -msgstr "Terminologia ruginii:" - -#: src/slices-and-lifetimes/str.md -#, fuzzy -msgid "`&str` an immutable reference to a string slice." -msgstr "`&str` o referință imuabilă la o felie de șir de caractere." +msgid "\"Bob\"" +msgstr "\"Bob\"" -#: src/slices-and-lifetimes/str.md +#: src/borrowing/exercise.md:51 src/borrowing/solution.md:53 #, fuzzy -msgid "`String` a mutable string buffer." -msgstr "`String` un buffer de șir de caractere mutabil." +msgid "\"I'm {} and my age is {}\"" +msgstr "\"Eu sunt {} și vârsta mea este {}\"" -#: src/slices-and-lifetimes/str.md +#: src/lifetimes.md:4 #, fuzzy msgid "" -"`&str` introduces a string slice, which is an immutable reference to UTF-8 " -"encoded string data stored in a block of memory. String literals " -"(`”Hello”`), are stored in the program’s binary." +"[Lifetime Annotations](./lifetimes/lifetime-annotations.md) (10 minutes)" msgstr "" -"`&str` introduce o felie de șir de caractere, care este o referință imuabilă " -"la date de șir de caractere codificate UTF-8 stocate într-un bloc de " -"memorie. Șirurile literale (`\"Hello\"`), sunt stocate în binarul " -"programului." +"[Adnotări privind durata de viață](./slices-and-lifetimes/lifetime-" +"annotations.md) (10 minute)" -#: src/slices-and-lifetimes/str.md +#: src/lifetimes.md:5 #, fuzzy -msgid "" -"Rust’s `String` type is a wrapper around a vector of bytes. As with a " -"`Vec`, it is owned." +msgid "[Lifetime Elision](./lifetimes/lifetime-elision.md) (5 minutes)" msgstr "" -"Tipul `String` din Rust este un înveliș în jurul unui vector de octeți. La " -"fel ca și în cazul unui `Vec`, acesta este deținut." +"[Lifetime Elision](./slices-and-lifetimes/lifetime-elision.md) (5 minute)" -#: src/slices-and-lifetimes/str.md +#: src/lifetimes.md:6 #, fuzzy -msgid "" -"As with many other types `String::from()` creates a string from a string " -"literal; `String::new()` creates a new empty string, to which string data " -"can be added using the `push()` and `push_str()` methods." +msgid "[Struct Lifetimes](./lifetimes/struct-lifetimes.md) (5 minutes)" msgstr "" -"Ca și în cazul multor alte tipuri, `String::from()` creează un șir de " -"caractere dintr-un literal de șir; `String::new()` creează un nou șir de " -"caractere gol, la care se pot adăuga date de șiruri de caractere folosind " -"metodele `push()` și `push_str()`." +"[Struct Lifetimes](./slices-and-lifetimes/struct-lifetimes.md) (5 minute)" -#: src/slices-and-lifetimes/str.md +#: src/lifetimes.md:7 #, fuzzy -msgid "" -"The `format!()` macro is a convenient way to generate an owned string from " -"dynamic values. It accepts the same format specification as `println!()`." +msgid "[Exercise: Protobuf Parsing](./lifetimes/exercise.md) (30 minutes)" msgstr "" -"Macroul `format!()` este o modalitate convenabilă de a genera un șir de " -"caractere proprii din valori dinamice. Acceptă aceeași specificație de " -"format ca și `println!()`." +"[Exercițiu: Parsarea Protobuf](./slices-and-lifetimes/exercise.md) (30 " +"minute)" -#: src/slices-and-lifetimes/str.md -msgid "" -"You can borrow `&str` slices from `String` via `&` and optionally range " -"selection. If you select a byte range that is not aligned to character " -"boundaries, the expression will panic. The `chars` iterator iterates over " -"characters and is preferred over trying to get character boundaries right." -msgstr "" - -#: src/slices-and-lifetimes/str.md +#: src/lifetimes/lifetime-annotations.md:3 #, fuzzy msgid "" -"For C++ programmers: think of `&str` as `std::string_view` from C++, but the " -"one that always points to a valid string in memory. Rust `String` is a rough " -"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 "" -"Pentru programatorii din C++: gândiți-vă la `&str` ca la `const char*` din C+" -"+, dar cel care indică întotdeauna un șir de caractere valid în memorie. " -"Rust `String` este un echivalent aproximativ al lui `std::string` din C++ " -"(principala diferență: poate conține numai octeți codificați UTF-8 și nu va " -"folosi niciodată o optimizare pentru șiruri mici)." - -#: src/slices-and-lifetimes/str.md -#, fuzzy -msgid "Byte strings literals allow you to create a `&[u8]` value directly:" -msgstr "Șirurile de octeți vă permit să creați direct o valoare `&[u8]`:" - -#: src/slices-and-lifetimes/lifetime-annotations.md -msgid "" "A reference has a _lifetime_, which must not \"outlive\" the value it refers " "to. This is verified by the borrow checker." msgstr "" +"O referință are o _durată de viață_, care nu trebuie să \"supraviețuiască\" " +"valorii la care se referă. Acest lucru este verificat de către verificatorul " +"de împrumut." -#: src/slices-and-lifetimes/lifetime-annotations.md +#: src/lifetimes/lifetime-annotations.md:6 +#, fuzzy msgid "" "The lifetime can be implicit - this is what we have seen so far. Lifetimes " "can also be explicit: `&'a Point`, `&'document str`. Lifetimes start with " "`'` and `'a` is a typical default name. Read `&'a Point` as \"a borrowed " "`Point` which is valid for at least the lifetime `a`\"." msgstr "" +"Durata de viață poate fi implicită - aceasta este ceea ce am văzut până " +"acum. Duratele de viață pot fi, de asemenea, explicite: `&'a Point`, " +"`&'document str`. Duratele de viață încep cu `'`, iar `'a` este un nume " +"implicit tipic. Citiți `&'a Point` ca \"un `Point` împrumutat care este " +"valabil cel puțin pentru durata de viață `a`\"." -#: src/slices-and-lifetimes/lifetime-annotations.md +#: src/lifetimes/lifetime-annotations.md:11 #, fuzzy msgid "" "Lifetimes are always inferred by the compiler: you cannot assign a lifetime " @@ -9674,49 +10530,68 @@ msgstr "" "Adnotările privind durata de viață creează constrângeri; compilatorul " "verifică dacă există o soluție validă." -#: src/slices-and-lifetimes/lifetime-annotations.md +#: src/lifetimes/lifetime-annotations.md:15 +#, fuzzy msgid "" "Lifetimes become more complicated when considering passing values to and " "returning values from functions." msgstr "" +"Duratele de viață devin mai complicate atunci când se ia în considerare " +"transmiterea valorilor către și returnarea valorilor din funcții." -#: src/slices-and-lifetimes/lifetime-annotations.md +#: src/lifetimes/lifetime-annotations.md:36 +#, fuzzy msgid "// What is the lifetime of p3?\n" -msgstr "" +msgstr "// Care este durata de viață a lui p3?\n" -#: src/slices-and-lifetimes/lifetime-annotations.md +#: src/lifetimes/lifetime-annotations.md:37 +#, fuzzy msgid "\"p3: {p3:?}\"" -msgstr "" +msgstr "\"p3: {p3:?}\"" -#: src/slices-and-lifetimes/lifetime-annotations.md +#: src/lifetimes/lifetime-annotations.md:44 +#, fuzzy msgid "" -"In this example, the the compiler does not know what lifetime to infer for " -"`p3`. Looking inside the function body shows that it can only safely assume " -"that `p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, " -"Rust requires explicit annotations of lifetimes on function arguments and " -"return values." +"In this example, the compiler does not know what lifetime to infer for `p3`. " +"Looking inside the function body shows that it can only safely assume that " +"`p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, Rust " +"requires explicit annotations of lifetimes on function arguments and return " +"values." msgstr "" +"În acest exemplu, compilatorul nu știe ce durată de viață să deducă pentru " +"`p3`. Privind în interiorul corpului funcției arată că poate doar să " +"presupună în mod sigur că durata de viață a lui `p3` este cea mai scurtă " +"dintre `p1` și `p2`. Dar, la fel ca tipurile, Rust necesită adnotări " +"explicite ale duratei de viață pentru argumentele funcțiilor și valorile de " +"returnare." -#: src/slices-and-lifetimes/lifetime-annotations.md +#: src/lifetimes/lifetime-annotations.md:50 +#, fuzzy msgid "Add `'a` appropriately to `left_most`:" -msgstr "" +msgstr "Adăugați `'a` în mod corespunzător la `left_most`:" -#: src/slices-and-lifetimes/lifetime-annotations.md +#: src/lifetimes/lifetime-annotations.md:56 +#, fuzzy msgid "" "This says, \"given p1 and p2 which both outlive `'a`, the return value lives " "for at least `'a`." msgstr "" +"Acest lucru spune: \"date fiind p1 și p2, care amândouă trăiesc mai mult de " +"`'a`, valoarea de întoarcere trăiește cel puțin `'a`." -#: src/slices-and-lifetimes/lifetime-annotations.md +#: src/lifetimes/lifetime-annotations.md:59 +#, fuzzy msgid "" "In common cases, lifetimes can be elided, as described on the next slide." msgstr "" +"În cazuri obișnuite, duratele de viață pot fi eludate, așa cum este descris " +"în slide-ul următor." -#: src/slices-and-lifetimes/lifetime-elision.md +#: src/lifetimes/lifetime-elision.md:1 msgid "Lifetimes in Function Calls" msgstr "Duratele de viață în apelurile de funcții" -#: src/slices-and-lifetimes/lifetime-elision.md +#: src/lifetimes/lifetime-elision.md:3 #, fuzzy msgid "" "Lifetimes for function arguments and return values must be fully specified, " @@ -9729,44 +10604,66 @@ msgstr "" "fie eludate în majoritatea cazurilor cu [câteva reguli simple](https://doc." "rust-lang.org/nomicon/lifetime-elision.html)." -#: src/slices-and-lifetimes/lifetime-elision.md +#: src/lifetimes/lifetime-elision.md:8 +#, fuzzy msgid "Each argument which does not have a lifetime annotation is given one." msgstr "" +"Fiecare argument care nu are o adnotare de durată de viață primește una." -#: src/slices-and-lifetimes/lifetime-elision.md +#: src/lifetimes/lifetime-elision.md:9 +#, fuzzy msgid "" "If there is only one argument lifetime, it is given to all un-annotated " "return values." msgstr "" +"În cazul în care există un singur argument pe durata de viață, acesta este " +"atribuit tuturor valorilor de returnare neanunțate." -#: src/slices-and-lifetimes/lifetime-elision.md +#: src/lifetimes/lifetime-elision.md:11 +#, fuzzy msgid "" "If there are multiple argument lifetimes, but the first one is for `self`, " "that lifetime is given to all un-annotated return values." msgstr "" +"Dacă există mai multe durate de viață ale argumentelor, dar prima este " +"pentru `self`, această durată de viață este acordată tuturor valorilor de " +"returnare neanunțate." -#: src/slices-and-lifetimes/lifetime-elision.md +#: src/lifetimes/lifetime-elision.md:53 +#, fuzzy msgid "In this example, `cab_distance` is trivially elided." -msgstr "" +msgstr "În acest exemplu, `cab_distance` este eliminat în mod trivial." -#: src/slices-and-lifetimes/lifetime-elision.md +#: src/lifetimes/lifetime-elision.md:55 +#, fuzzy msgid "" "The `nearest` function provides another example of a function with multiple " "references in its arguments that requires explicit annotation." msgstr "" +"Funcția `nearest` oferă un alt exemplu de funcție cu referințe multiple în " +"argumentele sale care necesită o adnotare explicită." -#: src/slices-and-lifetimes/lifetime-elision.md +#: src/lifetimes/lifetime-elision.md:58 +#, fuzzy msgid "Try adjusting the signature to \"lie\" about the lifetimes returned:" msgstr "" +"Încercați să ajustați semnătura pentru a \"minți\" cu privire la perioadele " +"de viață returnate:" -#: src/slices-and-lifetimes/lifetime-elision.md +#: src/lifetimes/lifetime-elision.md:64 +#, fuzzy msgid "" "This won't compile, demonstrating that the annotations are checked for " "validity by the compiler. Note that this is not the case for raw pointers " "(unsafe), and this is a common source of errors with unsafe Rust." msgstr "" +"Acest lucru nu se va compila, demonstrând că validitatea adnotărilor este " +"verificată de compilator. Rețineți că acest lucru nu este valabil și pentru " +"pointeri brute (unsafe), iar aceasta este o sursă comună de erori în cazul " +"Rust unsafe." -#: src/slices-and-lifetimes/lifetime-elision.md +#: src/lifetimes/lifetime-elision.md:68 +#, fuzzy msgid "" "Students may ask when to use lifetimes. Rust borrows _always_ have " "lifetimes. Most of the time, elision and type inference mean these don't " @@ -9774,12 +10671,19 @@ msgid "" "help resolve ambiguity. Often, especially when prototyping, it's easier to " "just work with owned data by cloning values where necessary." msgstr "" +"Elevii pot întreba când trebuie să folosească duratele de viață. " +"Împrumuturile Rust au _întotdeauna_ durate de viață. De cele mai multe ori, " +"eliziunea și inferența de tip înseamnă că acestea nu trebuie să fie scrise. " +"În cazuri mai complicate, adnotările privind durata de viață pot ajuta la " +"rezolvarea ambiguității. De multe ori, în special în cazul prototipurilor, " +"este mai ușor să lucrați cu datele deținute prin clonarea valorilor acolo " +"unde este necesar." -#: src/slices-and-lifetimes/struct-lifetimes.md +#: src/lifetimes/struct-lifetimes.md:1 msgid "Lifetimes in Data Structures" msgstr "Duratele de viață în structurile de date" -#: src/slices-and-lifetimes/struct-lifetimes.md +#: src/lifetimes/struct-lifetimes.md:3 #, fuzzy msgid "" "If a data type stores borrowed data, it must be annotated with a lifetime:" @@ -9787,27 +10691,32 @@ msgstr "" "În cazul în care un tip de date stochează date împrumutate, acesta trebuie " "să fie adnotat cu o durată de viață:" -#: src/slices-and-lifetimes/struct-lifetimes.md +#: src/lifetimes/struct-lifetimes.md:10 +#, fuzzy msgid "\"Bye {text}!\"" -msgstr "" +msgstr "\"La revedere {text}!\"" -#: src/slices-and-lifetimes/struct-lifetimes.md +#: src/lifetimes/struct-lifetimes.md:14 +#, fuzzy msgid "\"The quick brown fox jumps over the lazy dog.\"" -msgstr "" +msgstr "\"Vulpea cea iute și brună sare peste câinele leneș.\"" -#: src/slices-and-lifetimes/struct-lifetimes.md +#: src/lifetimes/struct-lifetimes.md:17 +#, fuzzy msgid "// erase(text);\n" -msgstr "" +msgstr "// erase(text);\n" -#: src/slices-and-lifetimes/struct-lifetimes.md +#: src/lifetimes/struct-lifetimes.md:18 +#, fuzzy msgid "\"{fox:?}\"" -msgstr "" +msgstr "\"{fox:?}\"" -#: src/slices-and-lifetimes/struct-lifetimes.md +#: src/lifetimes/struct-lifetimes.md:19 +#, fuzzy msgid "\"{dog:?}\"" -msgstr "" +msgstr "\"{dog:?}\"" -#: src/slices-and-lifetimes/struct-lifetimes.md +#: src/lifetimes/struct-lifetimes.md:26 #, fuzzy msgid "" "In the above example, the annotation on `Highlight` enforces that the data " @@ -9818,7 +10727,7 @@ msgstr "" "stau la baza `&str` conținute să aibă o durată de viață cel puțin egală cu " "cea a oricărei instanțe de `Highlight` care utilizează aceste date." -#: src/slices-and-lifetimes/struct-lifetimes.md +#: src/lifetimes/struct-lifetimes.md:29 #, fuzzy msgid "" "If `text` is consumed before the end of the lifetime of `fox` (or `dog`), " @@ -9827,7 +10736,7 @@ msgstr "" "Dacă `text` este consumat înainte de sfârșitul duratei de viață a lui `fox` " "(sau `dog`), verificatorul de împrumuturi aruncă o eroare." -#: src/slices-and-lifetimes/struct-lifetimes.md +#: src/lifetimes/struct-lifetimes.md:31 #, fuzzy msgid "" "Types with borrowed data force users to hold on to the original data. This " @@ -9838,14 +10747,14 @@ msgstr "" "originale. Acest lucru poate fi util pentru a crea vizualizări ușoare, dar, " "în general, le face ceva mai greu de utilizat." -#: src/slices-and-lifetimes/struct-lifetimes.md +#: src/lifetimes/struct-lifetimes.md:34 #, fuzzy msgid "When possible, make data structures own their data directly." msgstr "" "Atunci când este posibil, faceți ca structurile de date să dețină direct " "datele lor." -#: src/slices-and-lifetimes/struct-lifetimes.md +#: src/lifetimes/struct-lifetimes.md:35 #, fuzzy msgid "" "Some structs with multiple references inside can have more than one lifetime " @@ -9859,145 +10768,203 @@ msgstr "" "lângă durata de viață a structurii în sine. Acestea sunt cazuri de utilizare " "foarte avansate." -#: src/slices-and-lifetimes/exercise.md +#: src/lifetimes/exercise.md:3 +#, fuzzy msgid "" "In this exercise, you will build a parser for the [protobuf binary encoding]" "(https://protobuf.dev/programming-guides/encoding/). Don't worry, it's " "simpler than it seems! This illustrates a common parsing pattern, passing " "slices of data. The underlying data itself is never copied." msgstr "" +"În acest exercițiu, veți construi un parser pentru [protobuf binary encoding]" +"(https://protobuf.dev/programming-guides/encoding/). Nu vă faceți griji, " +"este mai simplu decât pare! Aceasta ilustrează un model comun de parsare, " +"trecând felii de date. Datele de bază în sine nu sunt niciodată copiate." -#: src/slices-and-lifetimes/exercise.md +#: src/lifetimes/exercise.md:8 +#, fuzzy msgid "" "Fully parsing a protobuf message requires knowing the types of the fields, " "indexed by their field numbers. That is typically provided in a `proto` " "file. In this exercise, we'll encode that information into `match` " "statements in functions that get called for each field." msgstr "" +"Analiza completă a unui mesaj protobuf necesită cunoașterea tipurilor de " +"câmpuri, indexate prin numerele de câmp. Acest lucru este furnizat de obicei " +"într-un fișier `proto`. În acest exercițiu, vom codifica aceste informații " +"în instrucțiuni `match` în funcții care sunt apelate pentru fiecare câmp." -#: src/slices-and-lifetimes/exercise.md +#: src/lifetimes/exercise.md:13 #, fuzzy msgid "We'll use the following proto:" msgstr "Puteți utiliza următorul `Cargo.toml`:" -#: src/slices-and-lifetimes/exercise.md +#: src/lifetimes/exercise.md:28 +#, fuzzy 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." msgstr "" +"Un mesaj proto este codificat ca o serie de câmpuri, unul după altul. " +"Fiecare este implementat ca o \"etichetă\" urmată de valoare. Eticheta " +"conține un număr de câmp (de exemplu, `2` pentru câmpul `id` al unui mesaj " +"`Person`) și un tip de fir care definește modul în care încărcătura utilă ar " +"trebui să fie determinată din fluxul de octeți." -#: src/slices-and-lifetimes/exercise.md +#: src/lifetimes/exercise.md:33 +#, fuzzy 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." msgstr "" +"Întregii, inclusiv tag-ul, sunt reprezentați cu o codificare de lungime " +"variabilă numită VARINT. Din fericire, `parse_varint` este definit pentru " +"dumneavoastră mai jos. Codul dat definește, de asemenea, callback-uri pentru " +"a gestiona câmpurile `Person` și `PhoneNumber` și pentru a analiza un mesaj " +"într-o serie de apeluri la aceste callback-uri." -#: src/slices-and-lifetimes/exercise.md +#: src/lifetimes/exercise.md:38 +#, fuzzy msgid "" "What remains for you is to implement the `parse_field` function and the " "`ProtoMessage` trait for `Person` and `PhoneNumber`." msgstr "" +"Ceea ce vă rămâne de făcut este să implementați funcția `parse_field` și " +"trăsătura `ProtoMessage` pentru `Person` și `PhoneNumber`." -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:49 src/lifetimes/solution.md:11 +#, fuzzy msgid "\"Invalid varint\"" -msgstr "" +msgstr "\"Invalid varint\"" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:51 src/lifetimes/solution.md:13 +#, fuzzy msgid "\"Invalid wire-type\"" -msgstr "" +msgstr "\"Tip de fir invalid\"" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:53 src/lifetimes/solution.md:15 +#, fuzzy msgid "\"Unexpected EOF\"" -msgstr "" +msgstr "\"Unexpected EOF\"" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:55 src/lifetimes/solution.md:17 +#, fuzzy msgid "\"Invalid length\"" -msgstr "" +msgstr "\"Lungime invalidă\"" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:57 src/lifetimes/solution.md:19 +#, fuzzy msgid "\"Unexpected wire-type)\"" -msgstr "" +msgstr "\"Tip de fir neașteptat)\"" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:59 src/lifetimes/solution.md:21 +#, fuzzy msgid "\"Invalid string (not UTF-8)\"" -msgstr "" +msgstr "\"Șir nevalabil (nu UTF-8)\"" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:62 src/lifetimes/solution.md:24 +#, fuzzy msgid "/// A wire type as seen on the wire.\n" -msgstr "" +msgstr "/// Un tip de fir, așa cum se vede pe fir.\n" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:65 src/lifetimes/solution.md:27 +#, fuzzy msgid "/// The Varint WireType indicates the value is a single VARINT.\n" -msgstr "" +msgstr "/// Varint WireType indică faptul că valoarea este un singur VARINT.\n" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:67 src/lifetimes/solution.md:29 +#, fuzzy msgid "" "//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" msgstr "" +"//I64, -- nu este necesar pentru acest exercițiu\n" +" /// Tipul de fir Len indică faptul că valoarea este o lungime " +"reprezentată sub forma unui număr de caractere\n" +" /// VARINT urmat de exact acest număr de octeți.\n" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:71 src/lifetimes/solution.md:33 +#, fuzzy msgid "" "/// The I32 WireType indicates that the value is precisely 4 bytes in\n" " /// little-endian order containing a 32-bit signed integer.\n" msgstr "" +"/// I32 WireType indică faptul că valoarea este exact 4 octeți în\n" +" /// little-endian care conțin un număr întreg semnat pe 32 de biți.\n" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:76 src/lifetimes/solution.md:38 +#, fuzzy msgid "/// A field's value, typed based on the wire type.\n" -msgstr "" +msgstr "/// Valoarea unui câmp, tipizată în funcție de tipul de fir.\n" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:80 src/lifetimes/solution.md:42 +#, fuzzy msgid "//I64(i64), -- not needed for this exercise\n" -msgstr "" +msgstr "//I64(i64), -- nu este necesar pentru acest exercițiu\n" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:85 src/lifetimes/solution.md:47 +#, fuzzy msgid "/// A field, containing the field number and its value.\n" -msgstr "" +msgstr "/// Un câmp, care conține numărul câmpului și valoarea acestuia.\n" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:102 src/lifetimes/solution.md:64 +#, fuzzy msgid "//1 => WireType::I64, -- not needed for this exercise\n" -msgstr "" +msgstr "//1 => WireType::I64, -- nu este necesar pentru acest exercițiu\n" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:132 src/lifetimes/solution.md:94 +#, fuzzy msgid "" "/// Parse a VARINT, returning the parsed value and the remaining bytes.\n" msgstr "" +"/// Analizează un VARINT, returnând valoarea analizată și octeții rămași.\n" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:140 src/lifetimes/solution.md:102 +#, fuzzy msgid "" "// This is the last byte of the VARINT, so convert it to\n" " // a u64 and return it.\n" msgstr "" +"// Acesta este ultimul octet din VARINT, deci convertiți-l în\n" +" // un u64 și returnați-l.\n" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:150 src/lifetimes/solution.md:112 +#, fuzzy msgid "// More than 7 bytes is invalid.\n" -msgstr "" +msgstr "// Mai mult de 7 octeți este invalid.\n" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:153 src/lifetimes/solution.md:115 +#, fuzzy msgid "/// Convert a tag into a field number and a WireType.\n" -msgstr "" +msgstr "/// Convertește o etichetă într-un număr de câmp și un tip de fir.\n" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:161 src/lifetimes/solution.md:122 +#, fuzzy msgid "/// Parse a field, returning the remaining bytes\n" -msgstr "" +msgstr "/// Parsează un câmp, returnând octeții rămași\n" -#: src/slices-and-lifetimes/exercise.md +#: src/lifetimes/exercise.md:167 +#, fuzzy msgid "" "\"Based on the wire type, build a Field, consuming as many bytes as " "necessary.\"" msgstr "" +"\"Pe baza tipului de fir, construiți un câmp, consumând atâția octeți câți " +"sunt necesari.\"" -#: src/slices-and-lifetimes/exercise.md +#: src/lifetimes/exercise.md:169 +#, fuzzy msgid "\"Return the field, and any un-consumed bytes.\"" -msgstr "" +msgstr "\"Întoarceți câmpul și toți octeții neconsumați.\"" -#: src/slices-and-lifetimes/exercise.md src/slices-and-lifetimes/solution.md +#: src/lifetimes/exercise.md:171 src/lifetimes/solution.md:153 +#, fuzzy msgid "" "/// Parse a message in the given data, calling `T::add_field` for each field " "in\n" @@ -10005,103 +10972,148 @@ msgid "" "///\n" "/// The entire input is consumed.\n" msgstr "" +"/// Parsează un mesaj în datele date, apelând `T::add_field` pentru fiecare " +"câmp din\n" +"/// mesajul.\n" +"///\n" +"/// Se consumă întreaga intrare.\n" -#: src/slices-and-lifetimes/exercise.md +#: src/lifetimes/exercise.md:198 +#, fuzzy msgid "// TODO: Implement ProtoMessage for Person and PhoneNumber.\n" -msgstr "" +msgstr "// TODO: Implementați ProtoMessage pentru Person și PhoneNumber.\n" -#: src/slices-and-lifetimes/solution.md +#: src/lifetimes/solution.md:146 +#, fuzzy msgid "// Unwrap error because `value` is definitely 4 bytes long.\n" -msgstr "" +msgstr "// Eroare de dezarhivare deoarece `value` are o lungime de 4 bytes.\n" -#: src/slices-and-lifetimes/solution.md +#: src/lifetimes/solution.md:187 src/lifetimes/solution.md:198 +#, fuzzy msgid "// skip everything else\n" -msgstr "" +msgstr "// săriți peste orice altceva\n" -#: src/slices-and-lifetimes/solution.md +#: src/lifetimes/solution.md:225 src/lifetimes/solution.md:232 +#: src/lifetimes/solution.md:239 +#, fuzzy msgid "b\"hello\"" -msgstr "" +msgstr "b \"hello\"" -#: src/welcome-day-4.md +#: src/welcome-day-4.md:1 #, fuzzy msgid "Welcome to Day 4" msgstr "Bine ați venit la Ziua 1" -#: src/welcome-day-4.md +#: src/welcome-day-4.md:3 #, fuzzy msgid "" "Today we will cover topics relating to building large-scale software in Rust:" msgstr "Astăzi, vom aborda câteva subiecte mai avansate din Rust:" -#: src/welcome-day-4.md +#: src/welcome-day-4.md:5 +#, fuzzy msgid "Iterators: a deep dive on the `Iterator` trait." -msgstr "" +msgstr "Iteratori: o scufundare în profunzime în trăsătura `Iterator`." -#: src/welcome-day-4.md +#: src/welcome-day-4.md:6 +#, fuzzy msgid "Modules and visibility." -msgstr "" +msgstr "Module și vizibilitate." -#: src/welcome-day-4.md +#: src/welcome-day-4.md:7 #, fuzzy msgid "Testing." msgstr "Testare" -#: src/welcome-day-4.md +#: src/welcome-day-4.md:8 #, fuzzy msgid "Error handling: panics, `Result`, and the try operator `?`." msgstr "Gestionarea erorilor: panici, `Result` și operatorul try `?`." -#: src/welcome-day-4.md +#: src/welcome-day-4.md:9 +#, fuzzy msgid "" "Unsafe Rust: the escape hatch when you can't express yourself in safe Rust." msgstr "" +"Unsafe Rust: portița de scăpare atunci când nu te poți exprima în Rust sigur." -#: src/welcome-day-4.md +#: src/welcome-day-4.md:14 +#, fuzzy msgid "[Welcome](./welcome-day-4.md) (3 minutes)" -msgstr "" +msgstr "[Intorducere](../welcome-day-4.md) (3 minute)" -#: src/welcome-day-4.md +#: src/welcome-day-4.md:15 +#, fuzzy msgid "[Iterators](./iterators.md) (45 minutes)" -msgstr "" +msgstr "[Iteratori](../iteratori.md) (45 minute)" -#: src/welcome-day-4.md +#: src/welcome-day-4.md:16 +#, fuzzy msgid "[Modules](./modules.md) (40 minutes)" -msgstr "" +msgstr "[Module](./modules.md) (40 minute)" -#: src/welcome-day-4.md -msgid "[Testing](./testing.md) (1 hour and 5 minutes)" +#: src/welcome-day-4.md:17 +#, fuzzy +msgid "[Testing](./testing.md) (45 minutes)" +msgstr "[Testare](../testing.md) (1 oră și 5 minute)" + +#: src/welcome-day-4.md:19 +#, fuzzy +msgid "" +"Including 10 minute breaks, this session should take about 2 hours and 40 " +"minutes" msgstr "" +"Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze " +"aproximativ 2 ore și 20 de minute" -#: src/iterators.md +#: src/iterators.md:4 +#, fuzzy msgid "[Iterator](./iterators/iterator.md) (5 minutes)" -msgstr "" +msgstr "[Iterator](./iterators/iterator.md) (5 minute)" -#: src/iterators.md +#: src/iterators.md:5 +#, fuzzy msgid "[IntoIterator](./iterators/intoiterator.md) (5 minutes)" -msgstr "" +msgstr "[IntoIterator](./iterators/intoiterator.md) (5 minute)" -#: src/iterators.md +#: src/iterators.md:6 +#, fuzzy msgid "[FromIterator](./iterators/fromiterator.md) (5 minutes)" -msgstr "" +msgstr "[FromIterator](./iterators/fromiterator.md) (5 minute)" -#: src/iterators.md +#: src/iterators.md:7 +#, fuzzy msgid "" "[Exercise: Iterator Method Chaining](./iterators/exercise.md) (30 minutes)" msgstr "" +"[Exercițiu: înlănțuirea metodelor Iterator](./iterators/exercițiu.md) (30 " +"minute)" -#: src/iterators/iterator.md +#: src/iterators.md:9 src/testing.md:9 +#, fuzzy +msgid "This segment should take about 45 minutes" +msgstr "Acest segment ar trebui să dureze aproximativ 45 de minute" + +#: src/iterators/iterator.md:3 +#, fuzzy 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:" msgstr "" +"Caracteristica [`Iterator`](https://doc.rust-lang.org/std/iter/trait." +"Iterator.html) permite iterația peste valorile dintr-o colecție. Aceasta " +"necesită o metodă `next` și oferă o mulțime de metode. Multe tipuri de " +"bibliotecă standard implementează `Iterator` și o puteți implementa și " +"dumneavoastră:" -#: src/iterators/iterator.md +#: src/iterators/iterator.md:27 +#, fuzzy msgid "\"fib({i}): {n}\"" -msgstr "" +msgstr "\"fib({i}): {n}\"" -#: src/iterators/iterator.md +#: src/iterators/iterator.md:35 #, fuzzy msgid "" "The `Iterator` trait implements many common functional programming " @@ -10116,7 +11128,7 @@ msgstr "" "acestea. În Rust, aceste funcții ar trebui să producă cod la fel de eficient " "ca și implementările imperative echivalente." -#: src/iterators/iterator.md +#: src/iterators/iterator.md:40 #, fuzzy msgid "" "`IntoIterator` is the trait that makes for loops work. It is implemented by " @@ -10131,7 +11143,7 @@ msgstr "" "puteți itera un vector cu `for i in some_vec { ... }`, dar `some_vec.next()` " "nu există." -#: src/iterators/intoiterator.md +#: src/iterators/intoiterator.md:3 #, fuzzy msgid "" "The `Iterator` trait tells you how to _iterate_ once you have created an " @@ -10142,11 +11154,12 @@ msgstr "" "Trăsătura `Iterator` vă spune cum să _iterați_ după ce ați creat un " "iterator. Trăsătura conexă `IntoIterator` vă spune cum să creați iteratorul:" -#: src/iterators/intoiterator.md +#: src/iterators/intoiterator.md:49 +#, fuzzy msgid "\"point = {x}, {y}\"" -msgstr "" +msgstr "\"point = {x}, {y}\"" -#: src/iterators/intoiterator.md +#: src/iterators/intoiterator.md:57 #, fuzzy msgid "" "Click through to the docs for `IntoIterator`. Every implementation of " @@ -10155,17 +11168,17 @@ msgstr "" "Sintaxa de aici înseamnă că fiecare implementare a lui `IntoIterator` " "trebuie să declare două tipuri:" -#: src/iterators/intoiterator.md +#: src/iterators/intoiterator.md:60 #, fuzzy msgid "`Item`: the type to iterate over, such as `i8`," msgstr "`Item`: tipul peste care iterăm, cum ar fi `i8`," -#: src/iterators/intoiterator.md +#: src/iterators/intoiterator.md:61 #, fuzzy msgid "`IntoIter`: the `Iterator` type returned by the `into_iter` method." msgstr "`IntoIter`: tipul `Iterator` returnat de metoda `into_iter`." -#: src/iterators/intoiterator.md +#: src/iterators/intoiterator.md:63 #, fuzzy msgid "" "Note that `IntoIter` and `Item` are linked: the iterator must have the same " @@ -10174,35 +11187,49 @@ msgstr "" "Rețineți că `IntoIter` și `Item` sunt legate: iteratorul trebuie să aibă " "același tip `Item`, ceea ce înseamnă că returnează `Opțiune``" -#: src/iterators/intoiterator.md +#: src/iterators/intoiterator.md:66 +#, fuzzy msgid "The example iterates over all combinations of x and y coordinates." -msgstr "" +msgstr "Exemplul itera peste toate combinațiile de coordonate x și y." -#: src/iterators/intoiterator.md +#: src/iterators/intoiterator.md:68 +#, fuzzy msgid "" "Try iterating over the grid twice in `main`. Why does this fail? Note that " "`IntoIterator::into_iter` takes ownership of `self`." msgstr "" +"Încercați să iterați peste grilă de două ori în `main`. De ce nu reușește " +"acest lucru? Rețineți că `IntoIterator::into_iter` preia proprietatea lui " +"`self`." -#: src/iterators/intoiterator.md +#: src/iterators/intoiterator.md:71 +#, fuzzy msgid "" "Fix this issue by implementing `IntoIterator` for `&Grid` and storing a " "reference to the `Grid` in `GridIter`." msgstr "" +"Rezolvați această problemă implementând `IntoIterator` pentru `&Grid` și " +"stocând o referință la `Grid` în `GridIter`." -#: src/iterators/intoiterator.md +#: src/iterators/intoiterator.md:74 +#, fuzzy msgid "" "The same problem can occur for standard library types: `for e in " "some_vector` will take ownership of `some_vector` and iterate over owned " "elements from that vector. Use `for e in &some_vector` instead, to iterate " "over references to elements of `some_vector`." msgstr "" +"Aceeași problemă poate apărea și în cazul tipurilor din biblioteca standard: " +"`for e in some_vector` va prelua proprietatea lui `some_vector` și va itera " +"peste elementele deținute din acel vector. Folosiți în schimb `for e in " +"&some_vector` pentru a itera peste referințele la elementele din " +"`some_vector`." -#: src/iterators/fromiterator.md +#: src/iterators/fromiterator.md:1 msgid "FromIterator" msgstr "FromIterator" -#: src/iterators/fromiterator.md +#: src/iterators/fromiterator.md:3 #, fuzzy msgid "" "[`FromIterator`](https://doc.rust-lang.org/std/iter/trait.FromIterator.html) " @@ -10213,33 +11240,42 @@ msgstr "" "html) vă permite să construiți o colecție dintr-un [`Iterator`](https://doc." "rust-lang.org/std/iter/trait.Iterator.html)." -#: src/iterators/fromiterator.md +#: src/iterators/fromiterator.md:9 +#, fuzzy msgid "\"prime_squares: {prime_squares:?}\"" -msgstr "" +msgstr "\"prime_squares: {prime_squares:?}\"" -#: src/iterators/fromiterator.md +#: src/iterators/fromiterator.md:16 #, fuzzy msgid "`Iterator` implements" msgstr "`Iterator`" -#: src/iterators/fromiterator.md +#: src/iterators/fromiterator.md:25 +#, fuzzy msgid "There are two ways to specify `B` for this method:" -msgstr "" +msgstr "Există două moduri de a specifica `B` pentru această metodă:" -#: src/iterators/fromiterator.md +#: src/iterators/fromiterator.md:27 +#, fuzzy msgid "" "With the \"turbofish\": `some_iterator.collect::()`, as " "shown. The `_` shorthand used here lets Rust infer the type of the `Vec` " "elements." msgstr "" +"Cu \"turbofish\": `some_iterator.collect::()`, după cum se " +"arată. Prescurtarea `_` folosită aici îi permite lui Rust să deducă tipul " +"elementelor `Vec`." -#: src/iterators/fromiterator.md +#: src/iterators/fromiterator.md:29 +#, fuzzy msgid "" "With type inference: `let prime_squares: Vec<_> = some_iterator.collect()`. " "Rewrite the example to use this form." msgstr "" +"Cu inferență de tip: `let prime_squares: Vec<_> = some_iterator.collect()`. " +"Rescrieți exemplul pentru a utiliza această formă." -#: src/iterators/fromiterator.md +#: src/iterators/fromiterator.md:32 #, fuzzy msgid "" "There are basic implementations of `FromIterator` for `Vec`, `HashMap`, etc. " @@ -10250,7 +11286,7 @@ msgstr "" "interesante, cum ar fi convertirea unui `Iterator<Item = Rezultat>` într-un `Resultat<Vec, E>`." -#: src/iterators/exercise.md +#: src/iterators/exercise.md:3 #, fuzzy msgid "" "In this exercise, you will need to find and use some of the provided methods " @@ -10260,7 +11296,7 @@ msgstr "" "Puteți implementa trăsătura [`Iterator`](https://doc.rust-lang.org/std/iter/" "trait.Iterator.html) pe propriile tipuri:" -#: src/iterators/exercise.md +#: src/iterators/exercise.md:6 #, fuzzy msgid "" "Copy the following code to and make the tests " @@ -10271,7 +11307,8 @@ msgstr "" "să treacă. Încercați să evitați să alocați un `Vec` pentru rezultatele " "intermediare:" -#: src/iterators/exercise.md src/iterators/solution.md +#: src/iterators/exercise.md:11 src/iterators/solution.md:4 +#, fuzzy msgid "" "/// Calculate the differences between elements of `values` offset by " "`offset`,\n" @@ -10279,55 +11316,66 @@ msgid "" "///\n" "/// Element `n` of the result is `values[(n+offset)%len] - values[n]`.\n" msgstr "" +"/// Calculează diferențele dintre elementele din `valorile` decalate cu " +"`offset`,\n" +"/// înfășurându-se de la sfârșitul lui `values` la început.\n" +"///\n" +"/// Elementul `n` al rezultatului este `values[(n+offset)%len] - " +"values[n]`.\n" -#: src/modules.md -msgid "[Modules](./modules/modules.md) (5 minutes)" -msgstr "" +#: src/modules.md:4 +#, fuzzy +msgid "[Modules](./modules/modules.md) (3 minutes)" +msgstr "[Module](./module/modules/modules.md) (5 minute)" -#: src/modules.md +#: src/modules.md:5 +#, fuzzy msgid "[Filesystem Hierarchy](./modules/filesystem.md) (5 minutes)" -msgstr "" +msgstr "[Ierarhia sistemului de fișiere](./modules/filesystem.md) (5 minute)" -#: src/modules.md +#: src/modules.md:6 +#, fuzzy msgid "[Visibility](./modules/visibility.md) (5 minutes)" -msgstr "" +msgstr "[Vizibilitate](./modules/visibility.md) (5 minute)" -#: src/modules.md +#: src/modules.md:7 +#, fuzzy msgid "[use, super, self](./modules/paths.md) (10 minutes)" -msgstr "" +msgstr "[use, super, self](./modules/paths.md) (10 minute)" -#: src/modules.md +#: src/modules.md:8 +#, fuzzy msgid "" "[Exercise: Modules for a GUI Library](./modules/exercise.md) (15 minutes)" msgstr "" +"[Exercițiu: Module pentru o bibliotecă GUI](./modules/exercise.md) (15 " +"minute)" -#: src/modules.md -msgid "This segment should take about 40 minutes" -msgstr "" - -#: src/modules/modules.md +#: src/modules/modules.md:3 #, fuzzy msgid "We have seen how `impl` blocks let us namespace functions to a type." msgstr "" "Am văzut cum blocurile `impl` ne permit să atribuim funcții de namespace la " "un tip." -#: src/modules/modules.md +#: src/modules/modules.md:5 #, fuzzy msgid "Similarly, `mod` lets us namespace types and functions:" msgstr "" "În mod similar, `mod` ne permite să folosim tipuri și funcții de spațiu de " "nume:" -#: src/modules/modules.md +#: src/modules/modules.md:10 +#, fuzzy msgid "\"In the foo module\"" -msgstr "" +msgstr "\"În modulul foo\"" -#: src/modules/modules.md +#: src/modules/modules.md:16 +#, fuzzy msgid "\"In the bar module\"" -msgstr "" +msgstr "\"În modulul de bar\"" -#: src/modules/modules.md +#: src/modules/modules.md:29 #, fuzzy msgid "" "Packages provide functionality and include a `Cargo.toml` file that " @@ -10336,7 +11384,7 @@ msgstr "" "Pachetele oferă funcționalitate și includ un fișier `Cargo.toml` care " "descrie cum se construiește un pachet de 1+ crates." -#: src/modules/modules.md +#: src/modules/modules.md:31 #, fuzzy msgid "" "Crates are a tree of modules, where a binary crate creates an executable and " @@ -10345,14 +11393,14 @@ msgstr "" "Crates reprezintă un arbore de module, în care un crate binar creează un " "executabil, iar un crate de bibliotecă compilează o bibliotecă." -#: src/modules/modules.md +#: src/modules/modules.md:33 #, fuzzy msgid "Modules define organization, scope, and are the focus of this section." msgstr "" "Modulele definesc organizarea, domeniul de aplicare și reprezintă punctul " "central al acestei secțiuni." -#: src/modules/filesystem.md +#: src/modules/filesystem.md:3 #, fuzzy msgid "" "Omitting the module content will tell Rust to look for it in another file:" @@ -10360,7 +11408,7 @@ msgstr "" "Omiterea conținutului modulului îi va spune lui Rust să îl caute într-un alt " "fișier:" -#: src/modules/filesystem.md +#: src/modules/filesystem.md:9 #, fuzzy msgid "" "This tells rust that the `garden` module content is found at `src/garden." @@ -10371,22 +11419,22 @@ msgstr "" "`src/garden.rs`. În mod similar, un modul `garden::vegetables` se găsește la " "`src/garden/vegetables.rs`." -#: src/modules/filesystem.md +#: src/modules/filesystem.md:13 #, fuzzy msgid "The `crate` root is in:" msgstr "Rădăcina `crate` este în:" -#: src/modules/filesystem.md +#: src/modules/filesystem.md:15 #, fuzzy msgid "`src/lib.rs` (for a library crate)" msgstr "`src/lib.rs` (pentru o bibliotecă)" -#: src/modules/filesystem.md +#: src/modules/filesystem.md:16 #, fuzzy msgid "`src/main.rs` (for a binary crate)" msgstr "`src/main.rs` (pentru un crate binar)" -#: src/modules/filesystem.md +#: src/modules/filesystem.md:18 #, fuzzy msgid "" "Modules defined in files can be documented, too, using \"inner doc " @@ -10397,26 +11445,33 @@ msgstr "" "\"inner doc comments\". Acestea documentează elementul care le conține - în " "acest caz, un modul." -#: src/modules/filesystem.md +#: src/modules/filesystem.md:22 +#, fuzzy msgid "" "//! This module implements the garden, including a highly performant " "germination\n" "//! implementation.\n" msgstr "" +"//! Acest modul implementează grădina, inclusiv o germinație foarte " +"performantă\n" +"//! foarte performantă.\n" -#: src/modules/filesystem.md +#: src/modules/filesystem.md:24 +#, fuzzy msgid "// Re-export types from this module.\n" -msgstr "" +msgstr "// Reexportați tipurile din acest modul.\n" -#: src/modules/filesystem.md +#: src/modules/filesystem.md:28 +#, fuzzy msgid "/// Sow the given seed packets.\n" -msgstr "" +msgstr "/// Semănați pachetele de semințe date.\n" -#: src/modules/filesystem.md +#: src/modules/filesystem.md:33 +#, fuzzy msgid "/// Harvest the produce in the garden that is ready.\n" -msgstr "" +msgstr "/// Recoltați produsele din grădină care sunt gata.\n" -#: src/modules/filesystem.md +#: src/modules/filesystem.md:43 #, fuzzy msgid "" "Before Rust 2018, modules needed to be located at `module/mod.rs` instead of " @@ -10426,7 +11481,7 @@ msgstr "" "în loc de `module.rs`, iar aceasta este încă o alternativă funcțională " "pentru edițiile după 2018." -#: src/modules/filesystem.md +#: src/modules/filesystem.md:46 #, fuzzy msgid "" "The main reason to introduce `filename.rs` as alternative to `filename/mod." @@ -10436,14 +11491,14 @@ msgstr "" "`filename/mod.rs` a fost acela că multe fișiere numite `mod.rs` pot fi greu " "de distins în IDE-uri." -#: src/modules/filesystem.md +#: src/modules/filesystem.md:49 #, fuzzy msgid "Deeper nesting can use folders, even if the main module is a file:" msgstr "" "În cazul în care este vorba de o înglobare mai profundă, se pot utiliza " "dosare, chiar dacă modulul principal este un fișier:" -#: src/modules/filesystem.md +#: src/modules/filesystem.md:59 #, fuzzy msgid "" "The place rust will look for modules can be changed with a compiler " @@ -10452,11 +11507,12 @@ msgstr "" "Locul în care rust va căuta modulele poate fi schimbat cu o directivă de " "compilare:" -#: src/modules/filesystem.md +#: src/modules/filesystem.md:62 +#, fuzzy msgid "\"some/path.rs\"" -msgstr "" +msgstr "\"some/path.rs\"" -#: src/modules/filesystem.md +#: src/modules/filesystem.md:66 #, fuzzy msgid "" "This is useful, for example, if you would like to place tests for a module " @@ -10465,24 +11521,24 @@ msgstr "" "Acest lucru este util, de exemplu, dacă doriți să plasați testele pentru un " "modul într-un fișier numit `some_module_test.rs`, similar convenției din Go." -#: src/modules/visibility.md +#: src/modules/visibility.md:3 #, fuzzy msgid "Modules are a privacy boundary:" msgstr "Modulele reprezintă o limită de confidențialitate:" -#: src/modules/visibility.md +#: src/modules/visibility.md:5 #, fuzzy msgid "Module items are private by default (hides implementation details)." msgstr "" "Elementele modulului sunt private în mod implicit (ascunde detaliile de " "implementare)." -#: src/modules/visibility.md +#: src/modules/visibility.md:6 #, fuzzy msgid "Parent and sibling items are always visible." msgstr "Elementele părinților și ale fraților sunt întotdeauna vizibile." -#: src/modules/visibility.md +#: src/modules/visibility.md:7 #, fuzzy msgid "" "In other words, if an item is visible in module `foo`, it's visible in all " @@ -10491,28 +11547,32 @@ msgstr "" "Cu alte cuvinte, dacă un element este vizibil în modulul `foo`, el este " "vizibil în toți descendenții lui `foo`." -#: src/modules/visibility.md +#: src/modules/visibility.md:13 +#, fuzzy msgid "\"outer::private\"" -msgstr "" +msgstr "\"outer::private\"" -#: src/modules/visibility.md +#: src/modules/visibility.md:17 +#, fuzzy msgid "\"outer::public\"" -msgstr "" +msgstr "\"outer::public\"" -#: src/modules/visibility.md +#: src/modules/visibility.md:22 +#, fuzzy msgid "\"outer::inner::private\"" -msgstr "" +msgstr "\"outer::inner::private\"" -#: src/modules/visibility.md +#: src/modules/visibility.md:26 +#, fuzzy msgid "\"outer::inner::public\"" -msgstr "" +msgstr "\"outer::inner::public\"" -#: src/modules/visibility.md +#: src/modules/visibility.md:40 #, fuzzy msgid "Use the `pub` keyword to make modules public." msgstr "Utilizați cuvântul cheie `pub` pentru a face modulele publice." -#: src/modules/visibility.md +#: src/modules/visibility.md:42 #, fuzzy msgid "" "Additionally, there are advanced `pub(...)` specifiers to restrict the scope " @@ -10521,7 +11581,7 @@ msgstr "" "În plus, există specificatori avansați `pub(...)` pentru a restricționa " "domeniul de aplicare al vizibilității publice." -#: src/modules/visibility.md +#: src/modules/visibility.md:45 #, fuzzy msgid "" "See the [Rust Reference](https://doc.rust-lang.org/reference/visibility-and-" @@ -10530,17 +11590,17 @@ msgstr "" "A se vedea [Rust Reference](https://doc.rust-lang.org/reference/visibility-" "and-privacy.html#pubin-path-pubcrate-pubsuper-and-pubself)." -#: src/modules/visibility.md +#: src/modules/visibility.md:47 #, fuzzy msgid "Configuring `pub(crate)` visibility is a common pattern." msgstr "Configurarea vizibilității `pub(crate)` este un model comun." -#: src/modules/visibility.md +#: src/modules/visibility.md:48 #, fuzzy msgid "Less commonly, you can give visibility to a specific path." msgstr "Mai rar, puteți oferi vizibilitate unei anumite căi de acces." -#: src/modules/visibility.md +#: src/modules/visibility.md:49 #, fuzzy msgid "" "In any case, visibility must be granted to an ancestor module (and all of " @@ -10549,11 +11609,12 @@ msgstr "" "În orice caz, vizibilitatea trebuie să fie acordată unui modul strămoș (și " "tuturor descendenților săi)." -#: src/modules/paths.md +#: src/modules/paths.md:1 +#, fuzzy msgid "use, super, self" -msgstr "" +msgstr "`use`, `super`, `self`" -#: src/modules/paths.md +#: src/modules/paths.md:3 #, fuzzy msgid "" "A module can bring symbols from another module into scope with `use`. You " @@ -10563,58 +11624,65 @@ msgstr "" "`use`. De obicei, veți vedea ceva de genul acesta în partea de sus a " "fiecărui modul:" -#: src/modules/paths.md +#: src/modules/paths.md:11 msgid "Paths" msgstr "Trasee" -#: src/modules/paths.md +#: src/modules/paths.md:13 #, fuzzy msgid "Paths are resolved as follows:" msgstr "Căile de acces se rezolvă după cum urmează:" -#: src/modules/paths.md +#: src/modules/paths.md:15 #, fuzzy msgid "As a relative path:" msgstr "Ca o cale relativă:" -#: src/modules/paths.md +#: src/modules/paths.md:16 #, fuzzy msgid "`foo` or `self::foo` refers to `foo` in the current module," msgstr "`foo` sau `self::foo` se referă la `foo` din modulul curent," -#: src/modules/paths.md +#: src/modules/paths.md:17 #, fuzzy msgid "`super::foo` refers to `foo` in the parent module." msgstr "`super::foo` se referă la `foo` din modulul părinte." -#: src/modules/paths.md +#: src/modules/paths.md:19 #, fuzzy msgid "As an absolute path:" msgstr "Ca o cale absolută:" -#: src/modules/paths.md +#: src/modules/paths.md:20 #, fuzzy msgid "`crate::foo` refers to `foo` in the root of the current crate," msgstr "`crate::foo` se referă la `foo` din rădăcina cratei curente," -#: src/modules/paths.md +#: src/modules/paths.md:21 #, fuzzy msgid "`bar::foo` refers to `foo` in the `bar` crate." msgstr "`bar::foo` se referă la `foo` din cadrul `bar` crate." -#: src/modules/paths.md +#: src/modules/paths.md:26 +#, fuzzy msgid "" "It is common to \"re-export\" symbols at a shorter path. For example, the " "top-level `lib.rs` in a crate might have" msgstr "" +"Se obișnuiește să se \"reexporte\" simboluri pe o cale mai scurtă. De " +"exemplu, la nivelul superior `lib.rs` dintr-o cutie poate avea" -#: src/modules/paths.md +#: src/modules/paths.md:36 +#, fuzzy msgid "" "making `DiskStorage` and `NetworkStorage` available to other crates with a " "convenient, short path." msgstr "" +"făcând ca `DiskStorage` și `NetworkStorage` să fie disponibile pentru alte " +"crates cu o cale scurtă și convenabilă." -#: src/modules/paths.md +#: src/modules/paths.md:39 +#, fuzzy msgid "" "For the most part, only items that appear in a module need to be `use`'d. " "However, a trait must be in scope to call any methods on that trait, even if " @@ -10622,306 +11690,381 @@ msgid "" "`read_to_string` method on a type implementing the `Read` trait, you need to " "`use std::io::Read`." msgstr "" +"În cea mai mare parte, numai elementele care apar într-un modul trebuie să " +"fie \"utilizate\". Cu toate acestea, o trăsătură trebuie să se afle în " +"domeniul de aplicare pentru a apela orice metodă a acelei trăsături, chiar " +"dacă un tip care implementează acea trăsătură se află deja în domeniul de " +"aplicare. De exemplu, pentru a utiliza metoda `read_to_string` pe un tip " +"care implementează trăsătura `Read`, trebuie să `use std::io::Read`." -#: src/modules/paths.md +#: src/modules/paths.md:45 +#, fuzzy msgid "" "The `use` statement can have a wildcard: `use std::io::*`. This is " "discouraged because it is not clear which items are imported, and those " "might change over time." msgstr "" +"Instrucțiunea `use` poate avea un wildcard: `use std::io::*`. Acest lucru " +"este descurajat deoarece nu este clar ce elemente sunt importate, iar " +"acestea se pot schimba în timp." -#: src/modules/exercise.md +#: src/modules/exercise.md:3 +#, fuzzy msgid "" "In this exercise, you will reorganize a small GUI Library implementation. " "This library defines a `Widget` trait and a few implementations of that " "trait, as well as a `main` function." msgstr "" +"În acest exercițiu, veți reorganiza o mică implementare a unei biblioteci " +"GUI. Această bibliotecă definește o trăsătură `Widget` și câteva " +"implementări ale acestei trăsături, precum și o funcție `main`." -#: src/modules/exercise.md +#: src/modules/exercise.md:7 +#, fuzzy msgid "" "It is typical to put each type or set of closely-related types into its own " "module, so each widget type should get its own module." msgstr "" +"De obicei, fiecare tip sau set de tipuri strâns legate între ele este inclus " +"în propriul modul, astfel încât fiecare tip de widget ar trebui să aibă " +"propriul său modul." -#: src/modules/exercise.md +#: src/modules/exercise.md:10 #, fuzzy msgid "Cargo Setup" msgstr "Setare" -#: src/modules/exercise.md +#: src/modules/exercise.md:12 +#, fuzzy msgid "" "The Rust playground only supports one file, so you will need to make a Cargo " "project on your local filesystem:" msgstr "" +"Locul de joacă Rust acceptă doar un singur fișier, așa că va trebui să " +"creați un proiect Cargo în sistemul de fișiere local:" -#: src/modules/exercise.md +#: src/modules/exercise.md:21 +#, fuzzy msgid "" "Edit the resulting `src/main.rs` to add `mod` statements, and add additional " "files in the `src` directory." msgstr "" +"Modificați fișierul `src/main.rs` rezultat pentru a adăuga declarațiile " +"`mod` și adăugați fișiere suplimentare în directorul `src`." -#: src/modules/exercise.md +#: src/modules/exercise.md:24 msgid "Source" -msgstr "" +msgstr "Sursă" -#: src/modules/exercise.md +#: src/modules/exercise.md:26 +#, fuzzy msgid "Here's the single-module implementation of the GUI library:" -msgstr "" +msgstr "Iată implementarea unui singur modul al bibliotecii GUI:" -#: src/modules/exercise.md src/modules/solution.md +#: src/modules/exercise.md:30 src/modules/solution.md:36 +#, fuzzy msgid "/// Natural width of `self`.\n" -msgstr "" +msgstr "/// Lățimea naturală a lui `self`.\n" -#: src/modules/exercise.md src/modules/solution.md +#: src/modules/exercise.md:33 src/modules/solution.md:39 +#, fuzzy msgid "/// Draw the widget into a buffer.\n" -msgstr "" +msgstr "/// Desenați widget-ul într-un buffer.\n" -#: src/modules/exercise.md src/modules/solution.md +#: src/modules/exercise.md:36 src/modules/solution.md:42 +#, fuzzy msgid "/// Draw the widget on standard output.\n" -msgstr "" +msgstr "/// Desenează widget-ul pe ieșirea standard.\n" -#: src/modules/exercise.md src/modules/solution.md +#: src/modules/exercise.md:40 src/modules/solution.md:46 +#, fuzzy msgid "\"{buffer}\"" -msgstr "" +msgstr "\"{buffer}\"" -#: src/modules/exercise.md +#: src/modules/exercise.md:88 +#, fuzzy msgid "// Add 4 paddings for borders\n" -msgstr "" +msgstr "// Adăugați 4 padding-uri pentru margini\n" -#: src/modules/exercise.md +#: src/modules/exercise.md:100 +#, fuzzy msgid "" "// TODO: Change draw_into to return Result<(), std::fmt::Error>. Then use " "the\n" " // ?-operator here instead of .unwrap().\n" msgstr "" +"// TODO: Modificați draw_into pentru a returna Result<(), std::fmt::Error>. " +"Apoi, utilizați\n" +" // ?-operator aici în loc de .unwrap().\n" -#: src/modules/exercise.md src/modules/solution.md +#: src/modules/exercise.md:102 src/modules/exercise.md:108 +#: src/modules/solution.md:165 src/modules/solution.md:171 +#, fuzzy msgid "\"+-{:-. Then use\n" " // the ?-operator here instead of .unwrap().\n" msgstr "" +"// TODO: după ce ați învățat despre gestionarea erorilor, puteți schimba\n" +" // draw_into pentru a returna Result<(), std::fmt::Error>. Apoi, " +"utilizați\n" +" // operatorul ?- aici în loc de .unwrap().\n" -#: src/modules/solution.md +#: src/modules/solution.md:177 +#, fuzzy msgid "// ---- src/main.rs ----\n" -msgstr "" +msgstr "// ---- src/main.rs ----\n" -#: src/testing.md +#: src/testing.md:4 +#, fuzzy msgid "[Test Modules](./testing/unit-tests.md) (5 minutes)" -msgstr "" +msgstr "[Module de testare](./testing/unit-tests.md) (5 minute)" -#: src/testing.md -msgid "[Other Types of Tests](./testing/other.md) (10 minutes)" -msgstr "" - -#: src/testing.md -msgid "[Useful Crates](./testing/useful-crates.md) (3 minutes)" -msgstr "" - -#: src/testing.md -msgid "[GoogleTest](./testing/googletest.md) (5 minutes)" -msgstr "" - -#: src/testing.md -msgid "[Mocking](./testing/mocking.md) (5 minutes)" -msgstr "" +#: src/testing.md:5 +#, fuzzy +msgid "[Other Types of Tests](./testing/other.md) (5 minutes)" +msgstr "[Alte tipuri de teste](./testing/other.md) (10 minute)" -#: src/testing.md -msgid "[Compiler Lints and Clippy](./testing/lints.md) (5 minutes)" -msgstr "" +#: src/testing.md:6 +#, fuzzy +msgid "[Compiler Lints and Clippy](./testing/lints.md) (3 minutes)" +msgstr "[Compilatorul Lints și Clippy](./testing/lints.md) (5 minute)" -#: src/testing.md +#: src/testing.md:7 +#, fuzzy msgid "[Exercise: Luhn Algorithm](./testing/exercise.md) (30 minutes)" -msgstr "" +msgstr "[Exercițiu: Algoritmul Luhn](./testing/exercițiu.md) (30 minute)" -#: src/testing/unit-tests.md +#: src/testing/unit-tests.md:1 msgid "Unit Tests" msgstr "Teste unitare" -#: src/testing/unit-tests.md +#: src/testing/unit-tests.md:3 #, fuzzy msgid "Rust and Cargo come with a simple unit test framework:" msgstr "Rust și Cargo vin cu un cadru simplu de testare a unităților:" -#: src/testing/unit-tests.md +#: src/testing/unit-tests.md:5 #, fuzzy msgid "Unit tests are supported throughout your code." msgstr "Testele unitare sunt acceptate în tot codul dumneavoastră." -#: src/testing/unit-tests.md +#: src/testing/unit-tests.md:7 #, fuzzy msgid "Integration tests are supported via the `tests/` directory." msgstr "" "Testele de integrare sunt suportate prin intermediul directorului `tests/`." -#: src/testing/unit-tests.md +#: src/testing/unit-tests.md:9 +#, fuzzy 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." msgstr "" +"Testele sunt marcate cu `#[test]`. Testele unitare sunt deseori plasate într-" +"un modul `tests` imbricate, folosind `#[cfg(test)]` pentru a le compila " +"condiționat numai atunci când se construiesc testele." -#: src/testing/unit-tests.md +#: src/testing/unit-tests.md:37 #, fuzzy msgid "\"Hello World\"" -msgstr "Bună lume!" +msgstr "Bună lume" -#: src/testing/unit-tests.md +#: src/testing/unit-tests.md:42 #, fuzzy msgid "This lets you unit test private helpers." msgstr "Acest lucru vă permite să testați unitar ajutoarele private." -#: src/testing/unit-tests.md +#: src/testing/unit-tests.md:43 #, fuzzy msgid "The `#[cfg(test)]` attribute is only active when you run `cargo test`." msgstr "" "Atributul `#[cfg(test)]` este activ numai atunci când executați `cargo test`." -#: src/testing/unit-tests.md +#: src/testing/unit-tests.md:48 +#, fuzzy msgid "Run the tests in the playground in order to show their results." msgstr "" +"Executați testele în locul de joacă pentru a arăta rezultatele acestora." -#: src/testing/other.md +#: src/testing/other.md:3 msgid "Integration Tests" msgstr "Teste de integrare" -#: src/testing/other.md +#: src/testing/other.md:5 #, fuzzy msgid "If you want to test your library as a client, use an integration test." msgstr "" "Dacă doriți să vă testați biblioteca ca și client, utilizați un test de " "integrare." -#: src/testing/other.md +#: src/testing/other.md:7 #, fuzzy msgid "Create a `.rs` file under `tests/`:" msgstr "Creați un fișier `.rs` în `tests/`:" -#: src/testing/other.md +#: src/testing/other.md:10 +#, fuzzy msgid "// tests/my_library.rs\n" -msgstr "" +msgstr "// tests/my_library.rs\n" -#: src/testing/other.md +#: src/testing/other.md:19 #, fuzzy msgid "These tests only have access to the public API of your crate." msgstr "Aceste teste au acces numai la API-ul public al seriei dumneavoastră." -#: src/testing/other.md +#: src/testing/other.md:21 msgid "Documentation Tests" msgstr "Teste de documentare" -#: src/testing/other.md +#: src/testing/other.md:23 #, fuzzy msgid "Rust has built-in support for documentation tests:" msgstr "Rust are un suport încorporat pentru testele de documentare:" -#: src/testing/other.md +#: src/testing/other.md:26 #, fuzzy msgid "" "/// Shortens a string to the given length.\n" @@ -10945,19 +12088,19 @@ msgstr "" "}\n" "```" -#: src/testing/other.md +#: src/testing/other.md:38 #, fuzzy msgid "Code blocks in `///` comments are automatically seen as Rust code." msgstr "" "Blocurile de cod din comentariile `///` sunt considerate automat ca fiind " "cod Rust." -#: src/testing/other.md +#: src/testing/other.md:39 #, fuzzy msgid "The code will be compiled and executed as part of `cargo test`." msgstr "Codul va fi compilat și executat ca parte din `cargo test`." -#: src/testing/other.md +#: src/testing/other.md:40 #, fuzzy msgid "" "Adding `#` in the code will hide it from the docs, but will still compile/" @@ -10966,7 +12109,7 @@ msgstr "" "Adăugarea lui `# ` în cod îl va ascunde din documentație, dar îl va compila/" "executa în continuare." -#: src/testing/other.md +#: src/testing/other.md:42 #, fuzzy msgid "" "Test the above code on the [Rust Playground](https://play.rust-lang.org/?" @@ -10975,266 +12118,114 @@ msgstr "" "Testați codul de mai sus pe [Rust Playground](https://play.rust-lang.org/?" "version=stable&mode=debug&edition=2021&gist=3ce2ad13ea1302f6572cb15cd96becf0)." -#: src/testing/useful-crates.md -#, fuzzy -msgid "Rust comes with only basic support for writing tests." -msgstr "Rust vine doar cu un suport de bază pentru scrierea de teste." - -#: src/testing/useful-crates.md -#, fuzzy -msgid "Here are some additional crates which we recommend for writing tests:" -msgstr "" -"Iată câteva crates suplimentare pe care le recomandăm pentru scrierea de " -"teste:" - -#: src/testing/useful-crates.md -#, fuzzy -msgid "" -"[googletest](https://docs.rs/googletest): Comprehensive test assertion " -"library in the tradition of GoogleTest for C++." -msgstr "" -"[googletest](https://docs.rs/googletest): Bibliotecă cuprinzătoare de " -"testare a afirmațiilor de testare în tradiția GoogleTest pentru C++." - -#: src/testing/useful-crates.md -#, fuzzy -msgid "[proptest](https://docs.rs/proptest): Property-based testing for Rust." -msgstr "" -"[proptest](https://docs.rs/proptest): Testarea bazată pe proprietăți pentru " -"Rust." - -#: src/testing/useful-crates.md -#, fuzzy -msgid "" -"[rstest](https://docs.rs/rstest): Support for fixtures and parameterised " -"tests." -msgstr "" -"[rstest](https://docs.rs/rstest): Suport pentru testele de tip fixtures și " -"teste parametrizate." - -#: src/testing/googletest.md +#: src/testing/lints.md:3 #, fuzzy msgid "" -"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test " -"assertions using _matchers_:" -msgstr "" -"[googletest](https://docs.rs/googletest): Bibliotecă cuprinzătoare de " -"testare a afirmațiilor de testare în tradiția GoogleTest pentru C++." - -#: src/testing/googletest.md -msgid "\"baz\"" -msgstr "" - -#: src/testing/googletest.md -msgid "\"xyz\"" -msgstr "" - -#: src/testing/googletest.md -msgid "" -"If we change the last element to `\"!\"`, the test fails with a structured " -"error message pin-pointing the error:" -msgstr "" - -#: src/testing/googletest.md -msgid "" -"GoogleTest is not part of the Rust Playground, so you need to run this " -"example in a local environment. Use `cargo add googletest` to quickly add it " -"to an existing Cargo project." -msgstr "" - -#: src/testing/googletest.md -msgid "" -"The `use googletest::prelude::*;` line imports a number of [commonly used " -"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index." -"html)." -msgstr "" - -#: src/testing/googletest.md -msgid "This just scratches the surface, there are many builtin matchers." -msgstr "" - -#: src/testing/googletest.md -msgid "" -"A particularly nice feature is that mismatches in multi-line strings strings " -"are shown as a diff:" -msgstr "" - -#: src/testing/googletest.md -msgid "" -"\"Memory safety found,\\n\\\n" -" Rust's strong typing guides the way,\\n\\\n" -" Secure code you'll write.\"" -msgstr "" - -#: src/testing/googletest.md -msgid "" -"\"Memory safety found,\\n\\\n" -" Rust's silly humor guides the way,\\n\\\n" -" Secure code you'll write.\"" -msgstr "" - -#: src/testing/googletest.md -msgid "shows a color-coded diff (colors not shown here):" -msgstr "" - -#: src/testing/googletest.md -msgid "" -"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/" -"googletest/)." -msgstr "" - -#: src/testing/googletest.md -msgid "GoogleTest is available for use in AOSP." -msgstr "" - -#: src/testing/mocking.md -msgid "" -"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. " -"You need to refactor your code to use traits, which you can then quickly " -"mock:" -msgstr "" - -#: src/testing/mocking.md -msgid "" -"The advice here is for Android (AOSP) where Mockall is the recommended " -"mocking library. There are other [mocking libraries available on crates.io]" -"(https://crates.io/keywords/mock), in particular in the area of mocking HTTP " -"services. The other mocking libraries work in a similar fashion as Mockall, " -"meaning that they make it easy to get a mock implementation of a given trait." -msgstr "" - -#: src/testing/mocking.md -msgid "" -"Note that mocking is somewhat _controversial_: mocks allow you to completely " -"isolate a test from its dependencies. The immediate result is faster and " -"more stable test execution. On the other hand, the mocks can be configured " -"wrongly and return output different from what the real dependencies would do." -msgstr "" - -#: src/testing/mocking.md -msgid "" -"If at all possible, it is recommended that you use the real dependencies. As " -"an example, many databases allow you to configure an in-memory backend. This " -"means that you get the correct behavior in your tests, plus they are fast " -"and will automatically clean up after themselves." -msgstr "" - -#: src/testing/mocking.md -msgid "" -"Similarly, many web frameworks allow you to start an in-process server which " -"binds to a random port on `localhost`. Always prefer this over mocking away " -"the framework since it helps you test your code in the real environment." -msgstr "" - -#: src/testing/mocking.md -msgid "" -"Mockall is not part of the Rust Playground, so you need to run this example " -"in a local environment. Use `cargo add mockall` to quickly add Mockall to an " -"existing Cargo project." -msgstr "" - -#: src/testing/mocking.md -msgid "" -"Mockall has a lot more functionality. In particular, you can set up " -"expectations which depend on the arguments passed. Here we use this to mock " -"a cat which becomes hungry 3 hours after the last time it was fed:" -msgstr "" - -#: src/testing/mocking.md -msgid "" -"You can use `.times(n)` to limit the number of times a mock method can be " -"called to `n` --- the mock will automatically panic when dropped if this " -"isn't satisfied." -msgstr "" - -#: src/testing/lints.md -msgid "" "The Rust compiler produces fantastic error messages, as well as helpful " "built-in lints. [Clippy](https://doc.rust-lang.org/clippy/) provides even " "more lints, organized into groups that can be enabled per-project." msgstr "" +"Compilatorul Rust produce mesaje de eroare fantastice, precum și indicații " +"încorporate utile. [Clippy](https://doc.rust-lang.org/clippy/) oferă și mai " +"multe indicii, organizate în grupuri care pot fi activate pentru fiecare " +"proiect în parte." -#: src/testing/lints.md +#: src/testing/lints.md:14 +#, fuzzy msgid "\"X probably fits in a u16, right? {}\"" -msgstr "" +msgstr "\"X probabil că încape într-un u16, nu? {}\"" -#: src/testing/lints.md +#: src/testing/lints.md:21 +#, fuzzy 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 "" +"Rulați exemplul de cod și examinați mesajul de eroare. Aici sunt vizibile și " +"linte, dar acestea nu vor fi afișate odată ce codul se compilează. Treceți " +"la site-ul Playground pentru a afișa aceste linte." -#: src/testing/lints.md +#: src/testing/lints.md:25 +#, fuzzy 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." msgstr "" +"După ce ați rezolvat problemele, rulați `clippy` pe site-ul locului de joacă " +"pentru a afișa avertismentele clippy. Clippy are o documentație extinsă a " +"lints-urilor sale și adaugă noi lints (inclusiv lints default-deny) tot " +"timpul." -#: src/testing/lints.md +#: src/testing/lints.md:29 +#, fuzzy msgid "" "Note that errors or warnings with `help: ...` can be fixed with `cargo fix` " "or via your editor." msgstr "" +"Rețineți că erorile sau avertismentele cu `help: ...` pot fi corectate cu " +"`cargo fix` sau prin intermediul editorului dumneavoastră." -#: src/testing/exercise.md +#: src/testing/exercise.md:3 msgid "Luhn Algorithm" msgstr "Algoritmul Luhn" -#: src/testing/exercise.md -#, fuzzy +#: src/testing/exercise.md:5 msgid "" "The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is used " "to validate credit card numbers. The algorithm takes a string as input and " "does the following to validate the credit card number:" msgstr "" "[Algoritmul Luhn](https://en.wikipedia.org/wiki/Luhn_algorithm) este " -"utilizat pentru a valida numerele de carduri de credit. Algoritmul primește " -"un șir de caractere ca intrare și face următoarele pentru a valida numărul " -"cardului de credit:" +"utilizat pentru a valida numerele cardurilor de credit. Algoritmul primește " +"un șir de caractere ca intrare și face următoarele operații pentru a valida " +"numărul cardului de credit:" -#: src/testing/exercise.md +#: src/testing/exercise.md:9 #, fuzzy -msgid "Ignore all spaces. Reject number with less than two digits." -msgstr "Ignorați toate spațiile. Respinge numărul cu mai puțin de două cifre." +msgid "Ignore all spaces. Reject number with fewer than two digits." +msgstr "Ignoră toate spațiile. Respinge numărul cu mai puțin de două cifre." -#: src/testing/exercise.md +#: src/testing/exercise.md:11 #, fuzzy msgid "" "Moving from **right to left**, double every second digit: for the number " "`1234`, we double `3` and `1`. For the number `98765`, we double `6` and `8`." msgstr "" -"Mergând de la **dreapta la stânga**, dublăm fiecare a doua cifră: pentru " -"numărul `1234`, dublăm `3` și `1`. Pentru numărul `98765`, dublăm `6` și `8`." +"Mergând de la **dreapta la stânga**, se dublează fiecare a doua cifră: " +"pentru numărul `1234`, dublăm `3` și `1`. Pentru numărul `98765`, se " +"dublează `6` și `8`." -#: src/testing/exercise.md -#, fuzzy +#: src/testing/exercise.md:14 msgid "" "After doubling a digit, sum the digits if the result is greater than 9. So " "doubling `7` becomes `14` which becomes `1 + 4 = 5`." msgstr "" -"După ce ați dublat o cifră, adunați cifrele dacă rezultatul este mai mare de " -"9. Astfel, dublând `7` devine `14` care devine `1 + 4 = 5`." +"După ce o cifră a fost dublată, se adună cifrele dacă rezultatul este mai " +"mare de 9. Astfel, când se dublează `7` se obține `14` care devine `1 + 4 = " +"5`." -#: src/testing/exercise.md -#, fuzzy +#: src/testing/exercise.md:17 msgid "Sum all the undoubled and doubled digits." -msgstr "Adunați toate cifrele nedublate și dublate." +msgstr "Se adună toate cifrele nedublate și dublate." -#: src/testing/exercise.md -#, fuzzy +#: src/testing/exercise.md:19 msgid "The credit card number is valid if the sum ends with `0`." msgstr "Numărul cardului de credit este valabil dacă suma se termină cu `0`." -#: src/testing/exercise.md +#: src/testing/exercise.md:21 +#, fuzzy msgid "" "The provided code provides a buggy implementation of the luhn algorithm, " "along with two basic unit tests that confirm that most the algorithm is " "implemented correctly." msgstr "" +"Codul furnizat oferă o implementare eronată a algoritmului luhn, împreună cu " +"două teste unitare de bază care confirmă că majoritatea algoritmului este " +"implementat corect." -#: src/testing/exercise.md +#: src/testing/exercise.md:25 #, fuzzy msgid "" "Copy the code below to and write additional " @@ -11244,160 +12235,204 @@ msgstr "" "Copiați codul de mai jos în și completați " "funcțiile și metodele care lipsesc:" -#: src/testing/exercise.md src/testing/solution.md +#: src/testing/exercise.md:57 src/testing/solution.md:69 +#, fuzzy msgid "\"4263 9826 4026 9299\"" -msgstr "" +msgstr "\"4263 9826 4026 9299\"" -#: src/testing/exercise.md src/testing/solution.md +#: src/testing/exercise.md:58 src/testing/solution.md:70 +#, fuzzy msgid "\"4539 3195 0343 6467\"" -msgstr "" +msgstr "\"4539 3195 0343 6467\"" -#: src/testing/exercise.md src/testing/solution.md +#: src/testing/exercise.md:59 src/testing/solution.md:71 +#, fuzzy msgid "\"7992 7398 713\"" -msgstr "" +msgstr "\"7992 7398 713\"" -#: src/testing/exercise.md src/testing/solution.md +#: src/testing/exercise.md:64 src/testing/solution.md:76 +#, fuzzy msgid "\"4223 9826 4026 9299\"" -msgstr "" +msgstr "\"4223 9826 4026 9299\"" -#: src/testing/exercise.md src/testing/solution.md +#: src/testing/exercise.md:65 src/testing/solution.md:77 +#, fuzzy msgid "\"4539 3195 0343 6476\"" -msgstr "" +msgstr "\"4539 3195 0343 6476\"" -#: src/testing/exercise.md src/testing/solution.md +#: src/testing/exercise.md:66 src/testing/solution.md:78 +#, fuzzy msgid "\"8273 1232 7352 0569\"" -msgstr "" +msgstr "\"8273 1232 7352 0569\"" -#: src/testing/solution.md +#: src/testing/solution.md:4 +#, fuzzy msgid "// This is the buggy version that appears in the problem.\n" -msgstr "" +msgstr "// Aceasta este versiunea cu erori care apare în problemă.\n" -#: src/testing/solution.md +#: src/testing/solution.md:27 +#, fuzzy msgid "// This is the solution and passes all of the tests below.\n" -msgstr "" +msgstr "// Aceasta este soluția și trece toate testele de mai jos.\n" -#: src/testing/solution.md +#: src/testing/solution.md:56 +#, fuzzy msgid "\"1234 5678 1234 5670\"" -msgstr "" +msgstr "\"1234 5678 1234 5670\"" -#: src/testing/solution.md +#: src/testing/solution.md:58 +#, fuzzy msgid "\"Is {cc_number} a valid credit card number? {}\"" -msgstr "" +msgstr "\"Este {cc_number} un număr de card de credit valid? {}\"" -#: src/testing/solution.md +#: src/testing/solution.md:59 +#, fuzzy msgid "\"yes\"" -msgstr "" +msgstr "Da (inițializat la compilare)" -#: src/testing/solution.md +#: src/testing/solution.md:59 +#, fuzzy msgid "\"no\"" -msgstr "" +msgstr "\"nu\"" -#: src/testing/solution.md +#: src/testing/solution.md:84 +#, fuzzy msgid "\"foo 0 0\"" -msgstr "" +msgstr "\"foo 0 0 0\"" -#: src/testing/solution.md +#: src/testing/solution.md:90 +#, fuzzy msgid "\" \"" -msgstr "" +msgstr "\" \"" -#: src/testing/solution.md +#: src/testing/solution.md:91 +#, fuzzy msgid "\" \"" -msgstr "" +msgstr "\" \"" -#: src/testing/solution.md +#: src/testing/solution.md:92 +#, fuzzy msgid "\" \"" -msgstr "" +msgstr "\" \"" -#: src/testing/solution.md +#: src/testing/solution.md:97 +#, fuzzy msgid "\"0\"" -msgstr "" +msgstr "`[20, 30, 40]`, `[0; 3]`" -#: src/testing/solution.md +#: src/testing/solution.md:102 +#, fuzzy msgid "\" 0 0 \"" -msgstr "" +msgstr "\" 0 0 \"" -#: src/welcome-day-4-afternoon.md -msgid "[Error Handling](./error-handling.md) (45 minutes)" -msgstr "" +#: src/welcome-day-4-afternoon.md:4 +#, fuzzy +msgid "[Error Handling](./error-handling.md) (55 minutes)" +msgstr "[Gestionarea erorilor](../error-handling.md) (45 minute)" -#: src/welcome-day-4-afternoon.md +#: src/welcome-day-4-afternoon.md:5 +#, fuzzy msgid "[Unsafe Rust](./unsafe-rust.md) (1 hour and 5 minutes)" -msgstr "" +msgstr "[Unsafe Rust](../unsafe-rust.md) (1 oră și 5 minute)" -#: src/welcome-day-4-afternoon.md -msgid "Including 10 minute breaks, this session should take about 2 hours" +#: src/welcome-day-4-afternoon.md:7 +#, fuzzy +msgid "" +"Including 10 minute breaks, this session should take about 2 hours and 10 " +"minutes" msgstr "" +"Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze " +"aproximativ 2 ore și 15 minute" -#: src/error-handling.md +#: src/error-handling.md:4 +#, fuzzy msgid "[Panics](./error-handling/panics.md) (3 minutes)" -msgstr "" +msgstr "[Panici](./error-handling/panics.md) (3 minute)" -#: src/error-handling.md +#: src/error-handling.md:5 +#, fuzzy msgid "[Try Operator](./error-handling/try.md) (5 minutes)" -msgstr "" +msgstr "[Operator de încercare](./error-handling/try.md) (5 minute)" -#: src/error-handling.md +#: src/error-handling.md:6 +#, fuzzy msgid "[Try Conversions](./error-handling/try-conversions.md) (5 minutes)" msgstr "" +"[Încercați conversiile](./error-handling/try-conversions.md) (5 minute)" -#: src/error-handling.md +#: src/error-handling.md:7 +#, fuzzy msgid "[Error Trait](./error-handling/error.md) (5 minutes)" -msgstr "" +msgstr "[Error Trait](./error-handling/error.md) (5 minute)" -#: src/error-handling.md +#: src/error-handling.md:8 +#, fuzzy msgid "" "[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 minutes)" msgstr "" +"[thiserror and anyhow](./error-handling/thiserror-and-anyhow.md) (5 minute)" -#: src/error-handling.md +#: src/error-handling.md:9 +#, fuzzy msgid "" -"[Exercise: Rewriting with Result](./error-handling/exercise.md) (20 minutes)" +"[Exercise: Rewriting with Result](./error-handling/exercise.md) (30 minutes)" msgstr "" +"[Exercițiu: Rescrierea cu rezultat](./error-handling/exercise.md) (20 minute)" -#: src/error-handling/panics.md +#: src/error-handling/panics.md:3 +#, fuzzy msgid "Rust handles fatal errors with a \"panic\"." -msgstr "" +msgstr "Rust tratează erorile fatale cu un \"panic\"." -#: src/error-handling/panics.md +#: src/error-handling/panics.md:5 #, fuzzy msgid "Rust will trigger a panic if a fatal error happens at runtime:" msgstr "" "Rust va declanșa o panică în cazul în care se produce o eroare fatală în " "timpul execuției:" -#: src/error-handling/panics.md +#: src/error-handling/panics.md:10 +#, fuzzy msgid "\"v[100]: {}\"" -msgstr "" +msgstr "\"v[100]: {}\"" -#: src/error-handling/panics.md +#: src/error-handling/panics.md:14 #, fuzzy msgid "Panics are for unrecoverable and unexpected errors." msgstr "Panica este pentru erori irecuperabile și neașteptate." -#: src/error-handling/panics.md +#: src/error-handling/panics.md:15 #, fuzzy msgid "Panics are symptoms of bugs in the program." msgstr "Panicile sunt simptome ale unor erori în program." -#: src/error-handling/panics.md +#: src/error-handling/panics.md:16 +#, fuzzy msgid "Runtime failures like failed bounds checks can panic" msgstr "" +"Eșecurile în timpul execuției, cum ar fi verificările eșuate ale limitelor, " +"pot provoca panică" -#: src/error-handling/panics.md +#: src/error-handling/panics.md:17 +#, fuzzy msgid "Assertions (such as `assert!`) panic on failure" -msgstr "" +msgstr "Afirmațiile (cum ar fi `assert!`) intră în panică în caz de eșec" -#: src/error-handling/panics.md +#: src/error-handling/panics.md:18 +#, fuzzy msgid "Purpose-specific panics can use the `panic!` macro." -msgstr "" +msgstr "Panicile cu scop specific pot utiliza macroul `panic!`." -#: src/error-handling/panics.md +#: src/error-handling/panics.md:19 +#, fuzzy msgid "" "A panic will \"unwind\" the stack, dropping values just as if the functions " "had returned." msgstr "" +"O panică va \"derula\" stiva, eliminând valorile ca și cum funcțiile s-ar fi " +"întors." -#: src/error-handling/panics.md +#: src/error-handling/panics.md:21 #, fuzzy msgid "" "Use non-panicking APIs (such as `Vec::get`) if crashing is not acceptable." @@ -11405,7 +12440,7 @@ msgstr "" "Folosiți API-uri care nu se blochează (cum ar fi `Vec::get`) dacă nu este " "acceptabilă blocarea." -#: src/error-handling/panics.md +#: src/error-handling/panics.md:26 #, fuzzy msgid "" "By default, a panic will cause the stack to unwind. The unwinding can be " @@ -11414,25 +12449,31 @@ msgstr "" "În mod implicit, o panică va determina derularea stivei. Desfășurarea poate " "fi prinsă:" -#: src/error-handling/panics.md +#: src/error-handling/panics.md:32 +#, fuzzy msgid "\"No problem here!\"" -msgstr "" +msgstr "\"Nici o problemă aici!\"" -#: src/error-handling/panics.md +#: src/error-handling/panics.md:33 src/error-handling/panics.md:38 +#, fuzzy msgid "\"{result:?}\"" -msgstr "" +msgstr "“result: {}”" -#: src/error-handling/panics.md +#: src/error-handling/panics.md:36 +#, fuzzy msgid "\"oh no!\"" -msgstr "" +msgstr "\"Oh, nu!\"" -#: src/error-handling/panics.md +#: src/error-handling/panics.md:42 +#, fuzzy msgid "" "Catching is unusual; do not attempt to implement exceptions with " "`catch_unwind`!" msgstr "" +"Capturarea este neobișnuită; nu încercați să implementați excepții cu " +"`catch_unwind`!" -#: src/error-handling/panics.md +#: src/error-handling/panics.md:44 #, fuzzy msgid "" "This can be useful in servers which should keep running even if a single " @@ -11441,55 +12482,64 @@ msgstr "" "Acest lucru poate fi util în cazul serverelor care trebuie să continue să " "funcționeze chiar dacă o singură cerere se blochează." -#: src/error-handling/panics.md +#: src/error-handling/panics.md:46 #, fuzzy msgid "This does not work if `panic = 'abort'` is set in your `Cargo.toml`." msgstr "" "Acest lucru nu funcționează dacă `panic = 'abort'` este setat în `Cargo." "toml`." -#: src/error-handling/try.md +#: src/error-handling/try.md:3 +#, fuzzy msgid "" "Runtime errors like connection-refused or file-not-found are handled with " "the `Result` type, but matching this type on every call can be cumbersome. " "The try-operator `?` is used to return errors to the caller. It lets you " "turn the common" msgstr "" +"Erorile în timpul execuției, cum ar fi connection-refused sau file-not-" +"found, sunt tratate cu tipul `Result`, dar potrivirea acestui tip la fiecare " +"apel poate fi greoaie. Operatorul try `?` este utilizat pentru a returna " +"erorile către apelant. Acesta vă permite să transformați opțiunea comună" -#: src/error-handling/try.md +#: src/error-handling/try.md:15 #, fuzzy msgid "into the much simpler" msgstr "în mult mai simplu" -#: src/error-handling/try.md +#: src/error-handling/try.md:21 #, fuzzy msgid "We can use this to simplify our error handling code:" msgstr "" "Putem folosi acest lucru pentru a simplifica codul de tratare a erorilor:" -#: src/error-handling/try.md +#: src/error-handling/try.md:42 +#, fuzzy msgid "//fs::write(\"config.dat\", \"alice\").unwrap();\n" -msgstr "" +msgstr "//fs::write(\"config.dat\", \"alice\").unwrap();\n" -#: src/error-handling/try.md src/error-handling/try-conversions.md -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/try.md:43 src/error-handling/try-conversions.md:65 +#: src/error-handling/thiserror-and-anyhow.md:36 +#, fuzzy msgid "\"config.dat\"" -msgstr "" +msgstr "\"config.dat\"" -#: src/error-handling/try.md src/error-handling/try-conversions.md +#: src/error-handling/try.md:44 src/error-handling/try-conversions.md:66 +#, fuzzy msgid "\"username or error: {username:?}\"" -msgstr "" +msgstr "\"nume de utilizator sau eroare: {username:?}\"" -#: src/error-handling/try.md +#: src/error-handling/try.md:51 +#, fuzzy msgid "Simplify the `read_username` function to use `?`." -msgstr "" +msgstr "Simplificarea funcției `read_username` pentru a folosi `?`." -#: src/error-handling/try.md +#: src/error-handling/try.md:55 #, fuzzy msgid "The `username` variable can be either `Ok(string)` or `Err(error)`." msgstr "Variabila `username` poate fi fie `Ok(string)`, fie `Err(error)`." -#: src/error-handling/try.md +#: src/error-handling/try.md:56 #, fuzzy msgid "" "Use the `fs::write` call to test out the different scenarios: no file, empty " @@ -11498,15 +12548,20 @@ msgstr "" "Utilizați apelul `fs::write` pentru a testa diferite scenarii: niciun " "fișier, fișier gol, fișier cu nume de utilizator." -#: src/error-handling/try.md +#: src/error-handling/try.md:58 +#, fuzzy msgid "" "Note that `main` can return a `Result<(), E>` as long as it implements `std::" -"process:Termination`. In practice, this means that `E` implements `Debug`. " +"process::Termination`. In practice, this means that `E` implements `Debug`. " "The executable will print the `Err` variant and return a nonzero exit status " "on error." msgstr "" +"Rețineți că `main` poate returna un `Result<(), E>` atâta timp cât " +"implementează `std::process:Termination`. În practică, acest lucru înseamnă " +"că `E` implementează `Debug`. Executabilul va imprima varianta `Err` și va " +"returna o stare de ieșire diferită de zero în caz de eroare." -#: src/error-handling/try-conversions.md +#: src/error-handling/try-conversions.md:3 #, fuzzy msgid "" "The effective expansion of `?` is a little more complicated than previously " @@ -11515,12 +12570,12 @@ msgstr "" "Extinderea efectivă a lui `?` este puțin mai complicată decât s-a arătat " "anterior:" -#: src/error-handling/try-conversions.md +#: src/error-handling/try-conversions.md:10 #, fuzzy msgid "works the same as" msgstr "funcționează la fel ca" -#: src/error-handling/try-conversions.md +#: src/error-handling/try-conversions.md:19 #, fuzzy msgid "" "The `From::from` call here means we attempt to convert the error type to the " @@ -11530,20 +12585,24 @@ msgstr "" "Apelul `From::from` de aici înseamnă că încercăm să convertim tipul de " "eroare în tipul returnat de funcție." -#: src/error-handling/try-conversions.md +#: src/error-handling/try-conversions.md:42 +#, fuzzy msgid "\"IO error: {e}\"" -msgstr "" +msgstr "\"Eroare IO: {e}\"" -#: src/error-handling/try-conversions.md +#: src/error-handling/try-conversions.md:43 +#, fuzzy msgid "\"Found no username in {path}\"" -msgstr "" +msgstr "\"Nu am găsit niciun nume de utilizator în {path}\"" -#: src/error-handling/try-conversions.md -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/try-conversions.md:64 +#: src/error-handling/thiserror-and-anyhow.md:35 +#, fuzzy msgid "//fs::write(\"config.dat\", \"\").unwrap();\n" -msgstr "" +msgstr "//fs::write(\"config.dat\", \"\").unwrap();\n" -#: src/error-handling/try-conversions.md +#: src/error-handling/try-conversions.md:73 +#, fuzzy msgid "" "The `?` operator must return a value compatible with the return type of the " "function. For `Result`, it means that the error types have to be compatible. " @@ -11551,32 +12610,49 @@ msgid "" "of type `Result` if `ErrorOuter` and `ErrorInner` are the " "same type or if `ErrorOuter` implements `From`." msgstr "" +"Operatorul `?` trebuie să returneze o valoare compatibilă cu tipul de retur " +"al funcției. Pentru `Result`, aceasta înseamnă că tipurile de eroare trebuie " +"să fie compatibile. O funcție care returnează `Result` poate " +"folosi `?` pentru o valoare de tip `Result` numai dacă " +"`ErrorOuter` și `ErrorInner` sunt de același tip sau dacă `ErrorOuter` " +"implementează `From`." -#: src/error-handling/try-conversions.md +#: src/error-handling/try-conversions.md:79 +#, fuzzy msgid "" "A common alternative to a `From` implementation is `Result::map_err`, " "especially when the conversion only happens in one place." msgstr "" +"O alternativă obișnuită la o implementare `From` este `Result::map_err`, în " +"special atunci când conversia are loc într-un singur loc." -#: src/error-handling/try-conversions.md +#: src/error-handling/try-conversions.md:82 +#, fuzzy msgid "" "There is no compatibility requirement for `Option`. A function returning " "`Option` can use the `?` operator on `Option` for arbitrary `T` and " "`U` types." msgstr "" +"Nu există nicio cerință de compatibilitate pentru `Option`. O funcție care " +"returnează `Option` poate utiliza operatorul `?` pe `Option` pentru " +"tipuri arbitrare `T` și `U`." -#: src/error-handling/try-conversions.md +#: src/error-handling/try-conversions.md:86 +#, fuzzy msgid "" "A function that returns `Result` cannot use `?` on `Option` and vice versa. " "However, `Option::ok_or` converts `Option` to `Result` whereas `Result::ok` " "turns `Result` into `Option`." msgstr "" +"O funcție care returnează `Result` nu poate utiliza `?` pentru `Option` și " +"invers. Cu toate acestea, `Option::ok_or` transformă `Option` în `Result`, " +"în timp ce `Result::ok` transformă `Result` în `Option`." -#: src/error-handling/error.md +#: src/error-handling/error.md:1 msgid "Dynamic Error Types" msgstr "Tipuri de erori dinamice" -#: src/error-handling/error.md +#: src/error-handling/error.md:3 #, fuzzy msgid "" "Sometimes we want to allow any type of error to be returned without writing " @@ -11588,29 +12664,36 @@ msgstr "" "propriul nostru enum care să acopere toate posibilitățile diferite. `std::" "error::Error` facilitează acest lucru." -#: src/error-handling/error.md +#: src/error-handling/error.md:20 src/error-handling/error.md:21 +#, fuzzy msgid "\"count.dat\"" -msgstr "" +msgstr "\"count.dat\"" -#: src/error-handling/error.md +#: src/error-handling/error.md:20 +#, fuzzy msgid "\"1i3\"" -msgstr "" +msgstr "\"1i3\"" -#: src/error-handling/error.md +#: src/error-handling/error.md:22 +#, fuzzy msgid "\"Count: {count}\"" -msgstr "" +msgstr "\"Conte: {count}\"" -#: src/error-handling/error.md +#: src/error-handling/error.md:23 +#, fuzzy msgid "\"Error: {err}\"" -msgstr "" +msgstr "\"Eroare: {err}\"" -#: src/error-handling/error.md +#: src/error-handling/error.md:31 +#, fuzzy msgid "" "The `read_count` function can return `std::io::Error` (from file operations) " "or `std::num::ParseIntError` (from `String::parse`)." msgstr "" +"Funcția `read_count` poate returna `std::io::Error` (din operațiile cu " +"fișiere) sau `std::num::ParseIntError` (din `String::parse`)." -#: src/error-handling/error.md +#: src/error-handling/error.md:34 #, fuzzy msgid "" "Boxing errors saves on code, but gives up the ability to cleanly handle " @@ -11625,7 +12708,8 @@ msgstr "" "unei biblioteci, dar poate fi o opțiune bună într-un program în care doriți " "doar să afișați mesajul de eroare undeva." -#: src/error-handling/error.md +#: src/error-handling/error.md:40 +#, fuzzy msgid "" "Make sure to implement the `std::error::Error` trait when defining a custom " "error type so it can be boxed. But if you need to support the `no_std` " @@ -11633,8 +12717,13 @@ msgid "" "compatible with `no_std` in [nightly](https://github.com/rust-lang/rust/" "issues/103765) only." msgstr "" +"Asigurați-vă că implementați trăsătura `std::error::Error` atunci când " +"definiți un tip de eroare personalizat, astfel încât acesta să poată fi " +"încadrat. Dar dacă aveți nevoie să suportați atributul `no_std`, rețineți că " +"trăsătura `std::error::Error` este în prezent compatibilă cu `no_std` doar " +"în [nightly](https://github.com/rust-lang/rust/issues/103765)." -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:3 #, fuzzy msgid "" "The [`thiserror`](https://docs.rs/thiserror/) and [`anyhow`](https://docs.rs/" @@ -11643,62 +12732,82 @@ msgstr "" "Crăiasa [thiserror](https://docs.rs/thiserror/) este o modalitate populară " "de a crea o enumerație a erorilor, așa cum am făcut pe pagina anterioară:" -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:7 +#, fuzzy msgid "" "`thiserror` is often used in libraries to create custom error types that " "implement `From`." msgstr "" +"`thiserror` este adesea utilizat în biblioteci pentru a crea tipuri de erori " +"personalizate care implementează `From`." -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:9 +#, fuzzy msgid "" "`anyhow` is often used by applications to help with error handling in " "functions, including adding contextual information to your errors." msgstr "" +"`anyhow` este adesea utilizat de aplicații pentru a ajuta la gestionarea " +"erorilor în funcții, inclusiv adăugarea de informații contextuale la erori." -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:19 +#, fuzzy msgid "\"Found no username in {0}\"" -msgstr "" +msgstr "\"Nu am găsit niciun nume de utilizator în {0}\"" -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:25 +#, fuzzy msgid "\"Failed to open {path}\"" -msgstr "" +msgstr "\"Nu s-a reușit deschiderea {path}\"" -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:27 +#, fuzzy msgid "\"Failed to read\"" -msgstr "" +msgstr "\"Nu a reușit să citească\"" -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:37 +#, fuzzy msgid "\"Username: {username}\"" -msgstr "" +msgstr "\"Nume de utilizator: {username}\"" -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:38 +#, fuzzy msgid "\"Error: {err:?}\"" -msgstr "" +msgstr "\"Eroare: {err:?}\"" -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:46 #, fuzzy msgid "`thiserror`" msgstr "`Error`" -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:48 +#, fuzzy 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 "" +"Macroul derivat `Error` este furnizat de `thiserror` și are o mulțime de " +"atribute utile pentru a ajuta la definirea tipurilor de erori într-un mod " +"compact." -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:50 +#, fuzzy msgid "The `std::error::Error` trait is derived automatically." -msgstr "" +msgstr "Caracteristica `std::error::Error` este derivată automat." -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:51 +#, fuzzy msgid "The message from `#[error]` is used to derive the `Display` trait." msgstr "" +"Mesajul din `#[error]` este utilizat pentru a obține caracteristica " +"`Display`." -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:53 +#, fuzzy msgid "`anyhow`" -msgstr "" +msgstr "\"oricum" -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:55 #, fuzzy msgid "" "`anyhow::Error` is essentially a wrapper around `Box`. As such " @@ -11709,13 +12818,13 @@ msgstr "" "atare, în general, nu este o alegere bună pentru API-ul public al unei " "biblioteci, dar este utilizat pe scară largă în aplicații." -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:58 #, fuzzy msgid "`anyhow::Result` is a type alias for `Result`." msgstr "" "`anyhow::Result` este un alias de tip pentru `Result`." -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:59 #, fuzzy msgid "" "Actual error type inside of it can be extracted for examination if necessary." @@ -11723,7 +12832,7 @@ msgstr "" "Tipul real de eroare din interiorul acestuia poate fi extras pentru " "examinare, dacă este necesar." -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:60 #, fuzzy msgid "" "Functionality provided by `anyhow::Result` may be familiar to Go " @@ -11734,156 +12843,203 @@ msgstr "" "dezvoltatorilor Go, deoarece oferă modele de utilizare și ergonomie similare " "cu `(T, error)` din Go." -#: src/error-handling/thiserror-and-anyhow.md +#: src/error-handling/thiserror-and-anyhow.md:63 +#, fuzzy 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 "" +"`anyhow::Context` este o trăsătură implementată pentru tipurile standard " +"`Result` și `Option`. `use anyhow::Context` este necesar pentru a activa `." +"context()` și `.with_context()` pentru aceste tipuri." -#: src/error-handling/exercise.md +#: src/error-handling/exercise.md:1 +#, fuzzy msgid "Exercise: Rewriting with Result" -msgstr "" +msgstr "Exercițiu: rescrierea cu `Result`" -#: src/error-handling/exercise.md +#: src/error-handling/exercise.md:3 +#, fuzzy 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`." msgstr "" +"Următorul exemplu implementează un parser foarte simplu pentru un limbaj de " +"expresii. Cu toate acestea, acesta gestionează erorile prin panică. " +"Rescrieți-l pentru a utiliza în schimb o gestionare idiomatică a erorilor și " +"pentru a propaga erorile la o întoarcere din `main`. Nu ezitați să folosiți " +"`thiserror` și `anyhow`." -#: src/error-handling/exercise.md +#: src/error-handling/exercise.md:8 +#, fuzzy 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 "" +"SUGESTIE: începeți prin a remedia gestionarea erorilor în funcția `parse`. " +"Odată ce aceasta funcționează corect, actualizați `Tokenizer` pentru a " +"implementa `Iterator>`` și gestionați " +"acest lucru în parser." -#: src/error-handling/exercise.md src/error-handling/solution.md +#: src/error-handling/exercise.md:15 src/error-handling/solution.md:9 +#, fuzzy msgid "/// An arithmetic operator.\n" -msgstr "" +msgstr "/// Un operator aritmetic.\n" -#: src/error-handling/exercise.md src/error-handling/solution.md +#: src/error-handling/exercise.md:22 src/error-handling/solution.md:16 +#, fuzzy msgid "/// A token in the expression language.\n" -msgstr "" +msgstr "/// Un simbol în limbajul de exprimare.\n" -#: src/error-handling/exercise.md src/error-handling/solution.md +#: src/error-handling/exercise.md:30 src/error-handling/solution.md:24 +#, fuzzy msgid "/// An expression in the expression language.\n" -msgstr "" +msgstr "/// O expresie în limbajul de expresie.\n" -#: src/error-handling/exercise.md src/error-handling/solution.md +#: src/error-handling/exercise.md:34 src/error-handling/solution.md:28 +#, fuzzy msgid "/// A reference to a variable.\n" -msgstr "" +msgstr "/// O referință la o variabilă.\n" -#: src/error-handling/exercise.md src/error-handling/solution.md +#: src/error-handling/exercise.md:36 src/error-handling/solution.md:30 +#, fuzzy msgid "/// A literal number.\n" -msgstr "" +msgstr "/// Un număr literal.\n" -#: src/error-handling/exercise.md src/error-handling/solution.md +#: src/error-handling/exercise.md:38 src/error-handling/solution.md:32 +#, fuzzy msgid "/// A binary operation.\n" -msgstr "" +msgstr "/// O operațiune binară.\n" -#: src/error-handling/exercise.md src/error-handling/solution.md -msgid "'z'" -msgstr "" - -#: src/error-handling/exercise.md src/error-handling/solution.md +#: src/error-handling/exercise.md:64 src/error-handling/solution.md:64 +#, fuzzy msgid "'_'" -msgstr "" +msgstr "'_'" -#: src/error-handling/exercise.md src/error-handling/solution.md +#: src/error-handling/exercise.md:70 src/error-handling/solution.md:70 +#, fuzzy msgid "'+'" -msgstr "" +msgstr "'+'" -#: src/error-handling/exercise.md src/error-handling/solution.md +#: src/error-handling/exercise.md:71 src/error-handling/solution.md:71 +#, fuzzy msgid "'-'" -msgstr "" +msgstr "'-'" -#: src/error-handling/exercise.md +#: src/error-handling/exercise.md:72 +#, fuzzy msgid "\"Unexpected character {c}\"" -msgstr "" +msgstr "\"Caracter neașteptat {c}\"" -#: src/error-handling/exercise.md src/error-handling/solution.md +#: src/error-handling/exercise.md:82 src/error-handling/solution.md:81 +#, fuzzy msgid "\"Unexpected end of input\"" -msgstr "" +msgstr "\"Sfârșitul neașteptat al intrării\"" -#: src/error-handling/exercise.md +#: src/error-handling/exercise.md:86 +#, fuzzy msgid "\"Invalid 32-bit integer'\"" -msgstr "" +msgstr "\"Număr întreg de 32 de biți invalid\"" -#: src/error-handling/exercise.md +#: src/error-handling/exercise.md:90 src/error-handling/exercise.md:100 +#, fuzzy msgid "\"Unexpected token {tok:?}\"" -msgstr "" +msgstr "\"Jetoane neașteptate {tok:?}\"" -#: src/error-handling/exercise.md src/error-handling/solution.md +#: src/error-handling/exercise.md:92 src/error-handling/solution.md:104 +#, fuzzy msgid "// Look ahead to parse a binary operation if present.\n" msgstr "" +"// Se uită înainte pentru a analiza o operațiune binară, dacă este " +"prezentă.\n" -#: src/error-handling/exercise.md src/error-handling/solution.md +#: src/error-handling/exercise.md:108 src/error-handling/solution.md:121 +#, fuzzy msgid "\"10+foo+20-30\"" -msgstr "" +msgstr "\"10+foo+20-30\"" -#: src/error-handling/exercise.md src/error-handling/solution.md +#: src/error-handling/exercise.md:109 src/error-handling/solution.md:122 +#, fuzzy msgid "\"{expr:?}\"" -msgstr "" +msgstr "\"{expr:?}\"" -#: src/error-handling/solution.md +#: src/error-handling/solution.md:42 +#, fuzzy msgid "\"Unexpected character '{0}' in input\"" -msgstr "" +msgstr "\"Caracter neașteptat \"{0}\" în intrare\"" -#: src/error-handling/solution.md +#: src/error-handling/solution.md:79 +#, fuzzy msgid "\"Tokenizer error: {0}\"" -msgstr "" +msgstr "\"Eroare de tokenizare: {0}\"" -#: src/error-handling/solution.md +#: src/error-handling/solution.md:83 +#, fuzzy msgid "\"Unexpected token {0:?}\"" -msgstr "" +msgstr "\"Jetoane neașteptate {0:?}\"" -#: src/error-handling/solution.md +#: src/error-handling/solution.md:85 +#, fuzzy msgid "\"Invalid number\"" -msgstr "" +msgstr "\"Număr invalid\"" -#: src/unsafe-rust.md +#: src/unsafe-rust.md:4 +#, fuzzy msgid "[Unsafe](./unsafe-rust/unsafe.md) (5 minutes)" -msgstr "" +msgstr "[Nesigur](./unsafe-rust/unsafe.md) (5 minute)" -#: src/unsafe-rust.md +#: src/unsafe-rust.md:5 +#, fuzzy msgid "" "[Dereferencing Raw Pointers](./unsafe-rust/dereferencing.md) (10 minutes)" msgstr "" +"[Dereferențierea pointerilor brute](./unsafe-rust/dereferencing.md) (10 " +"minute)" -#: src/unsafe-rust.md +#: src/unsafe-rust.md:6 +#, fuzzy msgid "[Mutable Static Variables](./unsafe-rust/mutable-static.md) (5 minutes)" msgstr "" +"[Variabile statice mutabile](./unsafe-rust/mutable-static.md) (5 minute)" -#: src/unsafe-rust.md +#: src/unsafe-rust.md:7 +#, fuzzy msgid "[Unions](./unsafe-rust/unions.md) (5 minutes)" -msgstr "" +msgstr "[Uniuni](./unsafe-rust/unions.md) (5 minute)" -#: src/unsafe-rust.md +#: src/unsafe-rust.md:8 +#, fuzzy msgid "[Unsafe Functions](./unsafe-rust/unsafe-functions.md) (5 minutes)" -msgstr "" +msgstr "[Funcții nesigure](./unsafe-rust/unsafe-functions.md) (5 minute)" -#: src/unsafe-rust.md +#: src/unsafe-rust.md:9 +#, fuzzy msgid "[Unsafe Traits](./unsafe-rust/unsafe-traits.md) (5 minutes)" -msgstr "" +msgstr "[Trăsături nesigure](./unsafe-rust/unsafe-traits.md) (5 minute)" -#: src/unsafe-rust.md +#: src/unsafe-rust.md:10 msgid "[Exercise: FFI Wrapper](./unsafe-rust/exercise.md) (30 minutes)" -msgstr "" +msgstr "[Exercițiu: Împachetare FFI](./unsafe-rust/exercise.md) (30 minute)" + +#: src/unsafe-rust.md:12 +msgid "This segment should take about 1 hour and 5 minutes" +msgstr "Acest segment ar trebui să dureze aproximativ 1 oră și 5 minute" -#: src/unsafe-rust/unsafe.md +#: src/unsafe-rust/unsafe.md:3 #, fuzzy msgid "The Rust language has two parts:" msgstr "Limbajul Rust are două părți:" -#: src/unsafe-rust/unsafe.md +#: src/unsafe-rust/unsafe.md:5 #, fuzzy msgid "**Safe Rust:** memory safe, no undefined behavior possible." msgstr "**Safe Rust:** sigur în memorie, fără comportament nedefinit posibil." -#: src/unsafe-rust/unsafe.md +#: src/unsafe-rust/unsafe.md:6 #, fuzzy msgid "" "**Unsafe Rust:** can trigger undefined behavior if preconditions are " @@ -11892,7 +13048,7 @@ msgstr "" "**Unsafe Rust:** poate declanșa un comportament nedefinit dacă sunt " "încălcate condițiile prealabile." -#: src/unsafe-rust/unsafe.md +#: src/unsafe-rust/unsafe.md:8 #, fuzzy msgid "" "We saw mostly safe Rust in this course, but it's important to know what " @@ -11901,7 +13057,7 @@ msgstr "" "În acest curs vom vedea mai ales Rust sigur, dar este important să știm ce " "este Rust nesigur." -#: src/unsafe-rust/unsafe.md +#: src/unsafe-rust/unsafe.md:11 #, fuzzy msgid "" "Unsafe code is usually small and isolated, and its correctness should be " @@ -11911,37 +13067,37 @@ msgstr "" "documentată cu atenție. Acesta este de obicei acoperit de un strat de " "abstractizare sigur." -#: src/unsafe-rust/unsafe.md +#: src/unsafe-rust/unsafe.md:14 #, fuzzy msgid "Unsafe Rust gives you access to five new capabilities:" msgstr "Unsafe Rust vă oferă acces la cinci noi capacități:" -#: src/unsafe-rust/unsafe.md +#: src/unsafe-rust/unsafe.md:16 #, fuzzy msgid "Dereference raw pointers." msgstr "Dereferențierea indicatoarelor brute." -#: src/unsafe-rust/unsafe.md +#: src/unsafe-rust/unsafe.md:17 #, fuzzy msgid "Access or modify mutable static variables." msgstr "Accesarea sau modificarea variabilelor statice mutabile." -#: src/unsafe-rust/unsafe.md +#: src/unsafe-rust/unsafe.md:18 #, fuzzy msgid "Access `union` fields." msgstr "Accesați câmpurile `union`." -#: src/unsafe-rust/unsafe.md +#: src/unsafe-rust/unsafe.md:19 #, fuzzy msgid "Call `unsafe` functions, including `extern` functions." msgstr "Apelarea funcțiilor `unsafe`, inclusiv a funcțiilor `extern`." -#: src/unsafe-rust/unsafe.md +#: src/unsafe-rust/unsafe.md:20 #, fuzzy msgid "Implement `unsafe` traits." msgstr "Implementarea trăsăturilor `unsafe`." -#: src/unsafe-rust/unsafe.md +#: src/unsafe-rust/unsafe.md:22 #, fuzzy msgid "" "We will briefly cover unsafe capabilities next. For full details, please see " @@ -11953,7 +13109,7 @@ msgstr "" "rust-lang.org/book/ch19-01-unsafe-rust.html) și [Rustonomicon](https://doc." "rust-lang.org/nomicon/)." -#: src/unsafe-rust/unsafe.md +#: src/unsafe-rust/unsafe.md:29 #, fuzzy msgid "" "Unsafe Rust does not mean the code is incorrect. It means that developers " @@ -11966,17 +13122,18 @@ msgstr "" "scrie singuri codul corect. Înseamnă că compilatorul nu mai aplică regulile " "de siguranță a memoriei din Rust." -#: src/unsafe-rust/dereferencing.md +#: src/unsafe-rust/dereferencing.md:3 #, fuzzy msgid "Creating pointers is safe, but dereferencing them requires `unsafe`:" msgstr "" "Crearea de pointeri este sigură, dar dereferențierea lor necesită `unsafe`:" -#: src/unsafe-rust/dereferencing.md +#: src/unsafe-rust/dereferencing.md:7 +#, fuzzy msgid "\"careful!\"" -msgstr "" +msgstr "\"Atenție!\"" -#: src/unsafe-rust/dereferencing.md +#: src/unsafe-rust/dereferencing.md:12 #, fuzzy msgid "" "// Safe because r1 and r2 were obtained from references and so are\n" @@ -12008,19 +13165,23 @@ msgstr "" "}\n" "```" -#: src/unsafe-rust/dereferencing.md +#: src/unsafe-rust/dereferencing.md:18 +#, fuzzy msgid "\"r1 is: {}\"" -msgstr "" +msgstr "\"r1 este: {}\"" -#: src/unsafe-rust/dereferencing.md +#: src/unsafe-rust/dereferencing.md:19 +#, fuzzy msgid "\"uhoh\"" -msgstr "" +msgstr "\"uhoh\"" -#: src/unsafe-rust/dereferencing.md +#: src/unsafe-rust/dereferencing.md:20 +#, fuzzy msgid "\"r2 is: {}\"" -msgstr "" +msgstr "\"r2 este: {}\"" -#: src/unsafe-rust/dereferencing.md +#: src/unsafe-rust/dereferencing.md:23 +#, fuzzy msgid "" "// NOT SAFE. DO NOT DO THIS.\n" " /*\n" @@ -12029,8 +13190,14 @@ msgid "" " println!(\"r3 is: {}\", *r3);\n" " */" msgstr "" +"// NU ESTE SIGUR. NU FACEȚI ACEST LUCRU.\n" +" /*\n" +" let r3: &String = unsafe { &*r1 };\n" +" drop(s);\n" +" println!(\"r3 este: {}\", *r3);\n" +" */" -#: src/unsafe-rust/dereferencing.md +#: src/unsafe-rust/dereferencing.md:35 #, fuzzy msgid "" "It is good practice (and required by the Android Rust style guide) to write " @@ -12042,7 +13209,7 @@ msgstr "" "codul din interiorul acestuia îndeplinește cerințele de siguranță ale " "operațiilor nesigure pe care le efectuează." -#: src/unsafe-rust/dereferencing.md +#: src/unsafe-rust/dereferencing.md:39 #, fuzzy msgid "" "In the case of pointer dereferences, this means that the pointers must be " @@ -12052,12 +13219,12 @@ msgstr "" "să fie [_valabili_](https://doc.rust-lang.org/std/ptr/index.html#safety), " "adică:" -#: src/unsafe-rust/dereferencing.md +#: src/unsafe-rust/dereferencing.md:42 #, fuzzy msgid "The pointer must be non-null." msgstr "Pointerul trebuie să nu fie nul." -#: src/unsafe-rust/dereferencing.md +#: src/unsafe-rust/dereferencing.md:43 #, fuzzy msgid "" "The pointer must be _dereferenceable_ (within the bounds of a single " @@ -12066,17 +13233,17 @@ msgstr "" "Pointerul trebuie să fie _dereferențiabil_ (în limitele unui singur obiect " "alocat)." -#: src/unsafe-rust/dereferencing.md +#: src/unsafe-rust/dereferencing.md:45 #, fuzzy msgid "The object must not have been deallocated." msgstr "Obiectul nu trebuie să fi fost dezalocat." -#: src/unsafe-rust/dereferencing.md +#: src/unsafe-rust/dereferencing.md:46 #, fuzzy msgid "There must not be concurrent accesses to the same location." msgstr "Nu trebuie să existe accese simultane la aceeași locație." -#: src/unsafe-rust/dereferencing.md +#: src/unsafe-rust/dereferencing.md:47 #, fuzzy msgid "" "If the pointer was obtained by casting a reference, the underlying object " @@ -12086,35 +13253,41 @@ msgstr "" "obiectul subiacent trebuie să fie viu și nu se poate utiliza nicio referință " "pentru a accesa memoria." -#: src/unsafe-rust/dereferencing.md +#: src/unsafe-rust/dereferencing.md:50 #, fuzzy msgid "In most cases the pointer must also be properly aligned." msgstr "" "În cele mai multe cazuri, indicatorul trebuie, de asemenea, să fie bine " "aliniat." -#: src/unsafe-rust/dereferencing.md +#: src/unsafe-rust/dereferencing.md:52 +#, fuzzy 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_." msgstr "" +"Secțiunea \"NOT SAFE\" oferă un exemplu de un tip comun de eroare UB: `*r1` " +"are durata de viață `'static`, astfel încât `r3` are tipul `&'static String` " +"și, prin urmare, trăiește mai mult decât `s`. Crearea unei referințe dintr-" +"un pointer necesită _grea atenție_." -#: src/unsafe-rust/mutable-static.md +#: src/unsafe-rust/mutable-static.md:3 #, fuzzy msgid "It is safe to read an immutable static variable:" msgstr "Este sigur să citiți o variabilă statică imuabilă:" -#: src/unsafe-rust/mutable-static.md +#: src/unsafe-rust/mutable-static.md:6 #, fuzzy msgid "\"Hello, world!\"" -msgstr "Bună lume!" +msgstr "Bună lume" -#: src/unsafe-rust/mutable-static.md +#: src/unsafe-rust/mutable-static.md:9 +#, fuzzy msgid "\"HELLO_WORLD: {HELLO_WORLD}\"" -msgstr "" +msgstr "\"HELLO_WORLD: {HELLO_WORLD}\"" -#: src/unsafe-rust/mutable-static.md +#: src/unsafe-rust/mutable-static.md:13 #, fuzzy msgid "" "However, since data races can occur, it is unsafe to read and write mutable " @@ -12123,11 +13296,12 @@ msgstr "" "Cu toate acestea, deoarece pot apărea curse de date, nu este sigur să se " "citească și să se scrie variabilele statice mutabile:" -#: src/unsafe-rust/mutable-static.md +#: src/unsafe-rust/mutable-static.md:29 +#, fuzzy msgid "\"COUNTER: {COUNTER}\"" -msgstr "" +msgstr "\"COUNTER: {COUNTER}\"" -#: src/unsafe-rust/mutable-static.md +#: src/unsafe-rust/mutable-static.md:37 #, fuzzy msgid "" "The program here is safe because it is single-threaded. However, the Rust " @@ -12141,7 +13315,7 @@ msgstr "" "explică faptul că este un comportament nedefinit să mutați o statică din mai " "multe fire de execuție." -#: src/unsafe-rust/mutable-static.md +#: src/unsafe-rust/mutable-static.md:42 #, fuzzy msgid "" "Using a mutable static is generally a bad idea, but there are some cases " @@ -12152,27 +13326,29 @@ msgstr "" "unele cazuri în care ar putea avea sens în codul `no_std` de nivel scăzut, " "cum ar fi implementarea unui alocator de heap sau lucrul cu unele API-uri C." -#: src/unsafe-rust/unions.md +#: src/unsafe-rust/unions.md:3 #, fuzzy msgid "Unions are like enums, but you need to track the active field yourself:" msgstr "" "Uniunile sunt ca și enumerațiile, dar trebuie să urmăriți singur câmpul " "activ:" -#: src/unsafe-rust/unions.md +#: src/unsafe-rust/unions.md:14 +#, fuzzy msgid "\"int: {}\"" -msgstr "" +msgstr "\"int: {}\"" -#: src/unsafe-rust/unions.md +#: src/unsafe-rust/unions.md:15 +#, fuzzy msgid "\"bool: {}\"" -msgstr "" +msgstr "\"bool: {}\"" -#: src/unsafe-rust/unions.md +#: src/unsafe-rust/unions.md:15 #, fuzzy msgid "// Undefined behavior!\n" -msgstr "comportament nedefinit:" +msgstr "Nici un comportament nedefinit în timpul execuției:" -#: src/unsafe-rust/unions.md +#: src/unsafe-rust/unions.md:22 #, fuzzy msgid "" "Unions are very rarely needed in Rust as you can usually use an enum. They " @@ -12182,7 +13358,7 @@ msgstr "" "un enum. Ele sunt ocazional necesare pentru a interacționa cu API-urile " "bibliotecilor C." -#: src/unsafe-rust/unions.md +#: src/unsafe-rust/unions.md:25 #, fuzzy msgid "" "If you just want to reinterpret bytes as a different type, you probably want " @@ -12195,11 +13371,11 @@ msgstr "" "std/mem/fn.transmute.html) sau un înveliș sigur, cum ar fi [`zerocopy`]" "(https://crates.io/crates/zerocopy)." -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:3 src/unsafe-rust/unsafe-functions.md:75 msgid "Calling Unsafe Functions" msgstr "Apelarea funcțiilor nesigure" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:5 #, fuzzy msgid "" "A function or method can be marked `unsafe` if it has extra preconditions " @@ -12209,57 +13385,77 @@ msgstr "" "prealabile suplimentare pe care trebuie să le respectați pentru a evita un " "comportament nedefinit:" -#: src/unsafe-rust/unsafe-functions.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/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/rtc.md -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/unsafe-rust/unsafe-functions.md:9 src/unsafe-rust/exercise.md:91 +#: src/unsafe-rust/solution.md:41 src/android/interoperability/with-c.md:9 +#: src/android/interoperability/with-c/rust.md:15 +#: src/android/interoperability/with-c/rust.md:30 +#: src/android/interoperability/cpp/cpp-bridge.md:29 +#: src/android/interoperability/cpp/cpp-bridge.md:38 +#: src/exercises/chromium/build-rules.md:8 +#: src/exercises/chromium/build-rules.md:21 +#: src/bare-metal/aps/inline-assembly.md:19 +#: src/bare-metal/aps/better-uart/using.md:24 +#: src/bare-metal/aps/logging/using.md:23 +#: src/exercises/bare-metal/solutions-afternoon.md:43 +#, fuzzy msgid "\"C\"" -msgstr "" +msgstr "\"C\"" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:14 +#, fuzzy msgid "\"🗻∈🌏\"" -msgstr "" +msgstr "\"🗻∈🌏\"" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:16 +#, fuzzy 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" msgstr "" +"// Sigur, deoarece indicii sunt în ordinea corectă, în limitele lui\n" +" // șirului de caractere și se află pe limitele secvenței UTF-8.\n" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:19 +#: src/unsafe-rust/unsafe-functions.md:20 +#: src/unsafe-rust/unsafe-functions.md:21 +#, fuzzy msgid "\"emoji: {}\"" -msgstr "" +msgstr "\"emoji: {}\"" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:24 +#, fuzzy msgid "\"char count: {}\"" -msgstr "" +msgstr "\"char count: {}\"" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:27 #, fuzzy msgid "// Undefined behavior if abs misbehaves.\n" msgstr "Nici un comportament nedefinit în timpul execuției:" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:28 +#, fuzzy msgid "\"Absolute value of -3 according to C: {}\"" -msgstr "" +msgstr "\"Valoarea absolută a lui -3 în conformitate cu C: {}\"" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:31 +#, fuzzy 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" msgstr "" +"// Nerespectarea cerinței de codificare UTF-8 încalcă siguranța memoriei!\n" +" // println!(\"emoji: {}\", unsafe { emojis.get_unchecked(0..3) });\n" +" // println!(\"char count: {}\", count_chars(unsafe {\n" +" // emojis.get_ununchecked(0..3) }));\n" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:42 +#: src/unsafe-rust/unsafe-functions.md:87 msgid "Writing Unsafe Functions" msgstr "Scrierea funcțiilor nesigure" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:44 #, fuzzy msgid "" "You can mark your own functions as `unsafe` if they require particular " @@ -12268,7 +13464,8 @@ msgstr "" "Puteți marca propriile funcții ca fiind \"nesigure\" dacă acestea necesită " "anumite condiții pentru a evita un comportament nedefinit." -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:48 +#, fuzzy msgid "" "/// Swaps the values pointed to by the given pointers.\n" "///\n" @@ -12276,16 +13473,21 @@ msgid "" "///\n" "/// The pointers must be valid and properly aligned.\n" msgstr "" +"/// Schimbă valorile indicate de indicatoarele date.\n" +"///\n" +"/// # Siguranță\n" +"///\n" +"/// Punctele trebuie să fie valide și aliniate corespunzător.\n" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:63 msgid "// Safe because ...\n" -msgstr "" +msgstr "// Sigur, deoarece ...\n" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:68 msgid "\"a = {}, b = {}\"" -msgstr "" +msgstr "\"a = {}, b = {}\"" -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:77 #, fuzzy msgid "" "`get_unchecked`, like most `_unchecked` functions, is unsafe, because it can " @@ -12300,7 +13502,7 @@ msgstr "" "general orice funcție C poate avea un comportament nedefinit în orice " "circumstanțe arbitrare." -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:84 #, fuzzy msgid "" "The `\"C\"` in this example is the ABI; [other ABIs are available too]" @@ -12309,7 +13511,7 @@ msgstr "" "În acest exemplu, `\"C\"` este ABI; [sunt disponibile și alte ABI-uri]" "(https://doc.rust-lang.org/reference/items/external-blocks.html)." -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:89 #, fuzzy msgid "" "We wouldn't actually use pointers for a `swap` function - it can be done " @@ -12318,7 +13520,7 @@ msgstr "" "De fapt, nu vom folosi pointeri pentru acest lucru, deoarece acest lucru " "poate fi realizat în siguranță cu referințe." -#: src/unsafe-rust/unsafe-functions.md +#: src/unsafe-rust/unsafe-functions.md:92 #, fuzzy msgid "" "Note that unsafe code is allowed within an unsafe function without an " @@ -12331,11 +13533,11 @@ msgstr "" "`#[deny(unsafe_op_in_unsafe_fn)]`. Încercați să-l adăugați și vedeți ce se " "întâmplă." -#: src/unsafe-rust/unsafe-traits.md +#: src/unsafe-rust/unsafe-traits.md:1 msgid "Implementing Unsafe Traits" msgstr "Implementarea trăsăturilor nesigure" -#: src/unsafe-rust/unsafe-traits.md +#: src/unsafe-rust/unsafe-traits.md:3 #, fuzzy msgid "" "Like with functions, you can mark a trait as `unsafe` if the implementation " @@ -12345,7 +13547,7 @@ msgstr "" "dacă implementarea trebuie să garanteze anumite condiții pentru a evita un " "comportament nedefinit." -#: src/unsafe-rust/unsafe-traits.md +#: src/unsafe-rust/unsafe-traits.md:6 #, fuzzy msgid "" "For example, the `zerocopy` crate has an unsafe trait that looks [something " @@ -12355,18 +13557,24 @@ msgstr "" "de genul acesta](https://docs.rs/zerocopy/latest/zerocopy/trait.AsBytes." "html):" -#: src/unsafe-rust/unsafe-traits.md +#: src/unsafe-rust/unsafe-traits.md:12 +#, fuzzy msgid "" "/// ...\n" "/// # Safety\n" "/// The type must have a defined representation and no padding.\n" msgstr "" +"/// ...\n" +"/// # Siguranță\n" +"/// Tipul trebuie să aibă o reprezentare definită și să nu aibă umplutură.\n" -#: src/unsafe-rust/unsafe-traits.md +#: src/unsafe-rust/unsafe-traits.md:26 +#, fuzzy msgid "// Safe because u32 has a defined representation and no padding.\n" msgstr "" +"// Sigur, deoarece u32 are o reprezentare definită și nu are umplutură.\n" -#: src/unsafe-rust/unsafe-traits.md +#: src/unsafe-rust/unsafe-traits.md:34 #, fuzzy msgid "" "There should be a `# Safety` section on the Rustdoc for the trait explaining " @@ -12376,7 +13584,7 @@ msgstr "" "care să explice cerințele pentru ca trăsătura să fie implementată în " "siguranță." -#: src/unsafe-rust/unsafe-traits.md +#: src/unsafe-rust/unsafe-traits.md:37 #, fuzzy msgid "" "The actual safety section for `AsBytes` is rather longer and more " @@ -12385,17 +13593,16 @@ msgstr "" "Secțiunea de siguranță efectivă pentru `AsBytes` este mai lungă și mai " "complicată." -#: src/unsafe-rust/unsafe-traits.md +#: src/unsafe-rust/unsafe-traits.md:39 #, fuzzy msgid "The built-in `Send` and `Sync` traits are unsafe." msgstr "Trăsăturile încorporate `Send` și `Sync` sunt nesigure." -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:1 msgid "Safe FFI Wrapper" msgstr "Înfășurătorul FFI sigur" -#: src/unsafe-rust/exercise.md -#, fuzzy +#: src/unsafe-rust/exercise.md:3 msgid "" "Rust has great support for calling functions through a _foreign function " "interface_ (FFI). We will use this to build a safe wrapper for the `libc` " @@ -12406,27 +13613,27 @@ msgstr "" "un înveliș sigur pentru funcțiile `libc` pe care le-ați folosi din C pentru " "a citi numele fișierelor dintr-un director." -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:7 #, fuzzy msgid "You will want to consult the manual pages:" msgstr "Va trebui să consultați paginile din manual:" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:9 #, fuzzy msgid "[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)" msgstr "[`opendir(3)`](https://man7.org/linux/man-pages/man3/opendir.3.html)" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:10 #, fuzzy msgid "[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)" msgstr "[`readdir(3)`](https://man7.org/linux/man-pages/man3/readdir.3.html)" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:11 #, fuzzy msgid "[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)" msgstr "[`closedir(3)`](https://man7.org/linux/man-pages/man3/closedir.3.html)" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:13 #, fuzzy msgid "" "You will also want to browse the [`std::ffi`](https://doc.rust-lang.org/std/" @@ -12437,16 +13644,16 @@ msgstr "" "lang.org/std/ffi/). Acolo veți găsi o serie de tipuri de șiruri de caractere " "de care aveți nevoie pentru exercițiu:" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:16 #, fuzzy msgid "Encoding" msgstr "Codificare" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:16 msgid "Use" msgstr "Folosește" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:18 #, fuzzy msgid "" "[`str`](https://doc.rust-lang.org/std/primitive.str.html) and [`String`]" @@ -12455,17 +13662,19 @@ msgstr "" "[`str`](https://doc.rust-lang.org/std/primitive.str.html) și [`String`]" "(https://doc.rust-lang.org/std/string/struct.String.html)" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:18 #, fuzzy msgid "UTF-8" -msgstr "UTF-8" +msgstr "" +"Șirurile de caractere Rust sunt codificate UTF-8 și pot conține orice " +"caracter Unicode." -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:18 #, fuzzy msgid "Text processing in Rust" msgstr "Prelucrarea textului în Rust" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:19 #, fuzzy msgid "" "[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) and [`CString`]" @@ -12474,17 +13683,17 @@ msgstr "" "[`CStr`](https://doc.rust-lang.org/std/ffi/struct.CStr.html) și [`CString`]" "(https://doc.rust-lang.org/std/ffi/struct.CString.html)" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:19 #, fuzzy msgid "NUL-terminated" msgstr "Terminat cu NUL" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:19 #, fuzzy msgid "Communicating with C functions" msgstr "Comunicarea cu funcțiile C" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:20 #, fuzzy msgid "" "[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) and " @@ -12493,22 +13702,22 @@ msgstr "" "[`OsStr`](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) și " "[`OsString`](https://doc.rust-lang.org/std/ffi/struct.OsString.html)" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:20 #, fuzzy msgid "OS-specific" msgstr "Specific sistemului de operare" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:20 #, fuzzy msgid "Communicating with the OS" msgstr "Comunicarea cu sistemul de operare" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:22 #, fuzzy msgid "You will convert between all these types:" msgstr "Veți face conversia între toate aceste tipuri:" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:24 #, fuzzy msgid "" "`&str` to `CString`: you need to allocate space for a trailing `\\0` " @@ -12517,14 +13726,14 @@ msgstr "" "`&str` în `CString`: trebuie să alocați spațiu pentru un caracter `\\0` la " "sfârșit," -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:25 #, fuzzy msgid "`CString` to `*const i8`: you need a pointer to call C functions," msgstr "" "`CString` la `*const i8`: aveți nevoie de un pointer pentru a apela " "funcțiile C," -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:26 #, fuzzy msgid "" "`*const i8` to `&CStr`: you need something which can find the trailing `\\0` " @@ -12533,7 +13742,7 @@ msgstr "" "`*const i8` la `&CStr`: aveți nevoie de ceva care să poată găsi caracterul " "`\\0` din urmă," -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:28 #, fuzzy msgid "" "`&CStr` to `&[u8]`: a slice of bytes is the universal interface for \"some " @@ -12542,7 +13751,7 @@ msgstr "" "`&CStr` la `&[u8]`: o porțiune de octeți este interfața universală pentru " "\"unele date necunoscute\"," -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:30 #, fuzzy msgid "" "`&[u8]` to `&OsStr`: `&OsStr` is a step towards `OsString`, use [`OsStrExt`]" @@ -12552,7 +13761,7 @@ msgstr "" "[`OsStrExt`](https://doc.rust-lang.org/std/os/unix/ffi/trait.OsStrExt.html) " "pentru a-l crea," -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:33 #, fuzzy msgid "" "`&OsStr` to `OsString`: you need to clone the data in `&OsStr` to be able to " @@ -12561,7 +13770,7 @@ msgstr "" "`&OsStr` în `OsString`: trebuie să clonați datele din `&OsStr` pentru a le " "putea returna și a apela din nou `readdir`." -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:36 #, fuzzy msgid "" "The [Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) also has a very " @@ -12570,7 +13779,7 @@ msgstr "" "[Nomicon](https://doc.rust-lang.org/nomicon/ffi.html) are, de asemenea, un " "capitol foarte util despre FFI." -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:47 #, fuzzy msgid "" "Copy the code below to and fill in the missing " @@ -12579,30 +13788,46 @@ msgstr "" "Copiați codul de mai jos în și completați " "funcțiile și metodele care lipsesc:" -#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md +#: src/unsafe-rust/exercise.md:56 src/unsafe-rust/exercise.md:69 +#: src/unsafe-rust/exercise.md:80 src/unsafe-rust/exercise.md:94 +#: src/unsafe-rust/exercise.md:102 src/unsafe-rust/solution.md:6 +#: src/unsafe-rust/solution.md:19 src/unsafe-rust/solution.md:30 +#: src/unsafe-rust/solution.md:44 src/unsafe-rust/solution.md:52 +#, fuzzy msgid "\"macos\"" -msgstr "" +msgstr "\"macos\"" -#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md +#: src/unsafe-rust/exercise.md:59 src/unsafe-rust/solution.md:9 +#, fuzzy msgid "// Opaque type. See https://doc.rust-lang.org/nomicon/ffi.html.\n" -msgstr "" +msgstr "// Tip opac. A se vedea https://doc.rust-lang.org/nomicon/ffi.html.\n" -#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md +#: src/unsafe-rust/exercise.md:66 src/unsafe-rust/solution.md:16 +#, fuzzy msgid "" "// Layout according to the Linux man page for readdir(3), where ino_t and\n" " // off_t are resolved according to the definitions in\n" " // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\n" msgstr "" +"// Dispunere în conformitate cu pagina de manual Linux pentru readdir(3), " +"unde ino_t și\n" +" // off_t sunt rezolvate în conformitate cu definițiile din\n" +" // /usr/include/x86_64-linux-gnu/{sys/types.h, bits/typesizes.h}.\n" -#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md +#: src/unsafe-rust/exercise.md:79 src/unsafe-rust/solution.md:29 +#, fuzzy msgid "// Layout according to the macOS man page for dir(5).\n" msgstr "" +"// Dispunere în conformitate cu pagina de manual macOS pentru dir(5).\n" -#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md +#: src/unsafe-rust/exercise.md:94 src/unsafe-rust/exercise.md:102 +#: src/unsafe-rust/solution.md:44 src/unsafe-rust/solution.md:52 +#, fuzzy msgid "\"x86_64\"" -msgstr "" +msgstr "\"x86_64\"" -#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md +#: src/unsafe-rust/exercise.md:97 src/unsafe-rust/solution.md:47 +#, fuzzy msgid "" "// See https://github.com/rust-lang/libc/issues/414 and the section on\n" " // _DARWIN_FEATURE_64_BIT_INODE in the macOS man page for stat(2).\n" @@ -12612,112 +13837,152 @@ msgid "" " // to macOS (as opposed to iOS / wearOS / etc.) on Intel and " "PowerPC.\n" msgstr "" +"// A se vedea https://github.com/rust-lang/libc/issues/414 și secțiunea " +"privind\n" +" // _DARWIN_FEATURE_64_BIT_INODE din pagina de manual macOS pentru " +"stat(2).\n" +" //\n" +" // \"Platformele care existau înainte ca aceste actualizări să fie " +"disponibile\" se referă la\n" +" // la macOS (spre deosebire de iOS / wearOS / etc.) pe Intel și " +"PowerPC.\n" -#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md +#: src/unsafe-rust/exercise.md:103 src/unsafe-rust/solution.md:53 +#, fuzzy msgid "\"readdir$INODE64\"" -msgstr "" +msgstr "\"readdir$INODE64\"" -#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md +#: src/unsafe-rust/exercise.md:121 src/unsafe-rust/solution.md:71 +#, fuzzy msgid "" "// Call opendir and return a Ok value if that worked,\n" " // otherwise return Err with a message.\n" msgstr "" +"// Apelați opendir și returnați o valoare Ok dacă a funcționat,\n" +" // în caz contrar, se returnează Err cu un mesaj.\n" -#: src/unsafe-rust/exercise.md +#: src/unsafe-rust/exercise.md:130 +#, fuzzy msgid "// Keep calling readdir until we get a NULL pointer back.\n" msgstr "" +"// Continuați să apelați readdir până când primim înapoi un pointer NULL.\n" -#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md +#: src/unsafe-rust/exercise.md:137 src/unsafe-rust/solution.md:105 +#, fuzzy msgid "// Call closedir as needed.\n" -msgstr "" +msgstr "// Chemați closedir după cum este necesar.\n" -#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md -#: src/android/interoperability/with-c/rust.md +#: src/unsafe-rust/exercise.md:143 src/unsafe-rust/solution.md:116 +#: src/unsafe-rust/solution.md:140 src/unsafe-rust/solution.md:155 +#: src/android/interoperability/with-c/rust.md:44 +#, fuzzy msgid "\".\"" -msgstr "" +msgstr "\".\"" -#: src/unsafe-rust/exercise.md src/unsafe-rust/solution.md +#: src/unsafe-rust/exercise.md:144 src/unsafe-rust/solution.md:117 +#, fuzzy msgid "\"files: {:#?}\"" -msgstr "" +msgstr "\"fișiere: {:#?}\"" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:74 +#, fuzzy msgid "\"Invalid path: {err}\"" -msgstr "" +msgstr "\"Invalid path: {err}\"" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:75 +#, fuzzy msgid "// SAFETY: path.as_ptr() cannot be NULL.\n" -msgstr "" +msgstr "// SAFETY: path.as_ptr() nu poate fi NULL.\n" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:78 +#, fuzzy msgid "\"Could not open {:?}\"" -msgstr "" +msgstr "\"Nu s-a putut deschide {:?}\"" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:88 +#, fuzzy msgid "" "// Keep calling readdir until we get a NULL pointer back.\n" " // SAFETY: self.dir is never NULL.\n" msgstr "" +"// Continuați să apelați readdir până când primim înapoi un pointer NULL.\n" +" // SIGURANȚĂ: self.dir nu este niciodată NULL.\n" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:92 +#, fuzzy msgid "// We have reached the end of the directory.\n" -msgstr "" +msgstr "// Am ajuns la sfârșitul directorului.\n" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:95 +#, fuzzy msgid "" "// SAFETY: dirent is not NULL and dirent.d_name is NUL\n" " // terminated.\n" msgstr "" +"// SAFETY: dirent nu este NULL și dirent.d_name este NUL\n" +" // terminat.\n" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:107 +#, fuzzy msgid "// SAFETY: self.dir is not NULL.\n" -msgstr "" +msgstr "// SIGURANȚĂ: self.dir nu este NULL.\n" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:109 +#, fuzzy msgid "\"Could not close {:?}\"" -msgstr "" +msgstr "\"Nu s-a putut închide {:?}\"" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:128 +#, fuzzy msgid "\"no-such-directory\"" -msgstr "" +msgstr "\"no-such-directory\"" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:136 src/unsafe-rust/solution.md:151 +#, fuzzy msgid "\"Non UTF-8 character in path\"" -msgstr "" +msgstr "\"Caracter non-UTF-8 în calea de acces\"" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:140 src/unsafe-rust/solution.md:155 +#, fuzzy msgid "\"..\"" -msgstr "" +msgstr "\"..\"" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:147 src/unsafe-rust/solution.md:155 +#, fuzzy msgid "\"foo.txt\"" -msgstr "" +msgstr "\"foo.txt\"" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:147 +#, fuzzy msgid "\"The Foo Diaries\\n\"" -msgstr "" +msgstr "\"The Foo Diaries\\n\"" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:148 src/unsafe-rust/solution.md:155 +#, fuzzy msgid "\"bar.png\"" -msgstr "" +msgstr "\"bar.png\"" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:148 +#, fuzzy msgid "\"\\n\"" -msgstr "" +msgstr "\"\\n\"" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:149 src/unsafe-rust/solution.md:155 +#, fuzzy msgid "\"crab.rs\"" -msgstr "" +msgstr "\"crab.rs\"" -#: src/unsafe-rust/solution.md +#: src/unsafe-rust/solution.md:149 +#, fuzzy msgid "\"//! Crab\\n\"" -msgstr "" +msgstr "\"//! Crab\\n\"" -#: src/android.md +#: src/android.md:1 #, fuzzy msgid "Welcome to Rust in Android" msgstr "Bine ați venit la Rust în Android" -#: src/android.md +#: src/android.md:3 #, fuzzy msgid "" "Rust is supported for system software on Android. This means that you can " @@ -12728,7 +13993,7 @@ msgstr "" "lucru înseamnă că puteți scrie noi servicii de sistem de operare în Rust, " "precum și extinde serviciile existente." -#: src/android.md +#: src/android.md:7 #, fuzzy msgid "" "We will attempt to call Rust from one of your own projects today. So try to " @@ -12742,37 +14007,52 @@ msgstr "" "dependențe și tipuri \"exotice\", cu atât mai bine. Ceva care analizează " "niște octeți brute ar fi ideal." -#: src/android.md +#: src/android.md:14 +#, fuzzy msgid "" "The speaker may mention any of the following given the increased use of Rust " "in Android:" msgstr "" +"Vorbitorul poate menționa oricare dintre următoarele, având în vedere " +"utilizarea sporită a Rust în Android:" -#: src/android.md +#: src/android.md:17 +#, fuzzy msgid "" "Service example: [DNS over HTTP](https://security.googleblog.com/2022/07/dns-" "over-http3-in-android.html)" msgstr "" +"Exemplu de serviciu: [DNS prin HTTP](https://security.googleblog.com/2022/07/" +"dns-over-http3-in-android.html)" -#: src/android.md +#: src/android.md:20 +#, fuzzy msgid "" "Libraries: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/" "appendix/rutabaga_gfx.html)" msgstr "" +"Biblioteci: [Rutabaga Virtual Graphics Interface](https://crosvm.dev/book/" +"appendix/rutabaga_gfx.html)" -#: src/android.md +#: src/android.md:23 +#, fuzzy msgid "" "Kernel Drivers: [Binder](https://lore.kernel.org/rust-for-linux/20231101-" "rust-binder-v1-0-08ba9197f637@google.com/)" msgstr "" +"Driverele nucleului: [Binder](https://lore.kernel.org/rust-for-" +"linux/20231101-rust-binder-v1-0-08ba9197f637@google.com/)" -#: src/android.md +#: src/android.md:26 +#, fuzzy msgid "" "Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-" "rust-in-android.html)" msgstr "" +"Firmware: [pKVM firmware](https://security.googleblog.com/2023/10/bare-metal-" +"rust-in-android.html)" -#: src/android/setup.md +#: src/android/setup.md:3 #, fuzzy msgid "" "We will be using a Cuttlefish Android Virtual Device to test our code. Make " @@ -12781,7 +14061,7 @@ msgstr "" "Vom folosi un dispozitiv virtual Android pentru a testa codul nostru. " "Asigurați-vă că aveți acces la unul sau creați unul nou cu:" -#: src/android/setup.md +#: src/android/setup.md:12 #, fuzzy msgid "" "Please see the [Android Developer Codelab](https://source.android.com/docs/" @@ -12790,61 +14070,76 @@ msgstr "" "Vă rugăm să consultați [Android Developer Codelab](https://source.android." "com/docs/setup/start) pentru detalii." -#: src/android/setup.md +#: src/android/setup.md:20 +#, fuzzy msgid "" "Cuttlefish is a reference Android device designed to work on generic Linux " "desktops. MacOS support is also planned." msgstr "" +"Cuttlefish este un dispozitiv Android de referință conceput pentru a " +"funcționa pe desktop-uri Linux generice. De asemenea, este planificat și " +"suport pentru MacOS." -#: src/android/setup.md +#: src/android/setup.md:23 +#, fuzzy msgid "" "The Cuttlefish system image maintains high fidelity to real devices, and is " "the ideal emulator to run many Rust use cases." msgstr "" +"Imaginea de sistem Cuttlefish păstrează o fidelitate ridicată față de " +"dispozitivele reale și este emulatorul ideal pentru a rula multe cazuri de " +"utilizare Rust." -#: src/android/build-rules.md +#: src/android/build-rules.md:3 #, fuzzy msgid "The Android build system (Soong) supports Rust via a number of modules:" msgstr "" "Sistemul de compilare Android (Soong) acceptă Rust prin intermediul unui " "număr de module:" -#: src/android/build-rules.md -#, fuzzy +#: src/android/build-rules.md:5 msgid "Module Type" msgstr "Tipul de modul" -#: src/android/build-rules.md +#: src/android/build-rules.md:5 msgid "Description" msgstr "Descriere" -#: src/android/build-rules.md +#: src/android/build-rules.md:7 #, fuzzy msgid "`rust_binary`" -msgstr "`rust_binary`" +msgstr "" +"```javascript\n" +"rust_binary {\n" +" name: “cxx_test”,\n" +" srcs: [“lib.rs”],\n" +" rustlibs: [“libcxx”],\n" +" static_libs: [“libcxx_test_cpp”],\n" +"}\n" +"```" -#: src/android/build-rules.md +#: src/android/build-rules.md:7 #, fuzzy msgid "Produces a Rust binary." msgstr "Produce un binar Rust." -#: src/android/build-rules.md +#: src/android/build-rules.md:8 #, fuzzy msgid "`rust_library`" msgstr "`rust_library`" -#: src/android/build-rules.md +#: src/android/build-rules.md:8 #, fuzzy msgid "Produces a Rust library, and provides both `rlib` and `dylib` variants." msgstr "" "Produce o bibliotecă Rust și oferă atât variantele `rlib`, cât și `dylib`." -#: src/android/build-rules.md +#: src/android/build-rules.md:9 #, fuzzy msgid "`rust_ffi`" msgstr "`rust_ffi`" -#: src/android/build-rules.md +#: src/android/build-rules.md:9 #, fuzzy msgid "" "Produces a Rust C library usable by `cc` modules, and provides both static " @@ -12853,12 +14148,12 @@ msgstr "" "Produce o bibliotecă Rust C utilizabilă de modulele `cc` și oferă atât " "variante statice cât și partajate." -#: src/android/build-rules.md +#: src/android/build-rules.md:10 #, fuzzy msgid "`rust_proc_macro`" msgstr "`rust_proc_macro`" -#: src/android/build-rules.md +#: src/android/build-rules.md:10 #, fuzzy msgid "" "Produces a `proc-macro` Rust library. These are analogous to compiler " @@ -12867,34 +14162,34 @@ msgstr "" "Produce o bibliotecă Rust `proc-macro`. Acestea sunt analoge cu plugin-urile " "de compilator." -#: src/android/build-rules.md +#: src/android/build-rules.md:11 #, fuzzy msgid "`rust_test`" msgstr "`rust_test`" -#: src/android/build-rules.md +#: src/android/build-rules.md:11 #, fuzzy msgid "Produces a Rust test binary that uses the standard Rust test harness." msgstr "" "Produce un binar de testare Rust care utilizează harnașamentul standard de " "testare Rust." -#: src/android/build-rules.md +#: src/android/build-rules.md:12 #, fuzzy msgid "`rust_fuzz`" msgstr "`rust_fuzz`" -#: src/android/build-rules.md +#: src/android/build-rules.md:12 #, fuzzy msgid "Produces a Rust fuzz binary leveraging `libfuzzer`." msgstr "Produce un binar Rust fuzz folosind `libfuzzer`." -#: src/android/build-rules.md +#: src/android/build-rules.md:13 #, fuzzy msgid "`rust_protobuf`" msgstr "`rust_protobuf`" -#: src/android/build-rules.md +#: src/android/build-rules.md:13 #, fuzzy msgid "" "Generates source and produces a Rust library that provides an interface for " @@ -12903,507 +14198,1359 @@ msgstr "" "Generează sursa și produce o bibliotecă Rust care oferă o interfață pentru " "un anumit protobuf." -#: src/android/build-rules.md -#, fuzzy -msgid "`rust_bindgen`" -msgstr "`rust_bindgen`" +#: src/android/build-rules.md:14 +#, fuzzy +msgid "`rust_bindgen`" +msgstr "`rust_bindgen`" + +#: src/android/build-rules.md:14 +#, fuzzy +msgid "" +"Generates source and produces a Rust library containing Rust bindings to C " +"libraries." +msgstr "" +"Generează sursa și produce o bibliotecă Rust care conține legături Rust " +"pentru bibliotecile C." + +#: src/android/build-rules.md:16 +#, fuzzy +msgid "We will look at `rust_binary` and `rust_library` next." +msgstr "În continuare vom analiza `rust_binary` și `rust_library`." + +#: src/android/build-rules.md:20 +#, fuzzy +msgid "Additional items speaker may mention:" +msgstr "Alte elemente pe care vorbitorul le poate menționa:" + +#: src/android/build-rules.md:22 +#, fuzzy +msgid "" +"Cargo is not optimized for multi-language repos, and also downloads packages " +"from the internet." +msgstr "" +"Cargo nu este optimizat pentru depozite multilingve și, de asemenea, " +"descarcă pachete de pe internet." + +#: src/android/build-rules.md:25 +#, fuzzy +msgid "" +"For compliance and performance, Android must have crates in-tree. It must " +"also interop with C/C++/Java code. Soong fills that gap." +msgstr "" +"Pentru conformitate și performanță, Android trebuie să aibă cratere în " +"copac. De asemenea, trebuie să interacționeze cu codul C/C++/Java. Soong " +"umple acest gol." + +#: src/android/build-rules.md:28 +#, fuzzy +msgid "" +"Soong has many similarities to Bazel, which is the open-source variant of " +"Blaze (used in google3)." +msgstr "" +"Soong are multe asemănări cu Bazel, care este varianta open-source a lui " +"Blaze (utilizată în google3)." + +#: src/android/build-rules.md:31 +#, fuzzy +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 "" +"Există un plan de tranziție de la [Android](https://source.android.com/docs/" +"setup/build/bazel/introduction), [ChromeOS](https://chromium.googlesource." +"com/chromiumos/bazel/) și [Fuchsia](https://source.android.com/docs/setup/" +"build/bazel/introduction) la Bazel." + +#: src/android/build-rules.md:37 +#, fuzzy +msgid "Learning Bazel-like build rules is useful for all Rust OS developers." +msgstr "" +"Învățarea regulilor de compilare de tip Bazel este utilă pentru toți " +"dezvoltatorii Rust OS." + +#: src/android/build-rules.md:39 +#, fuzzy +msgid "Fun fact: Data from Star Trek is a Soong-type Android." +msgstr "Fapt amuzant: Data din Star Trek este un Android de tip Soong." + +#: src/android/build-rules/binary.md:1 +#, fuzzy +msgid "Rust Binaries" +msgstr "Binare Rust" + +#: src/android/build-rules/binary.md:3 +#, fuzzy +msgid "" +"Let us start with a simple application. At the root of an AOSP checkout, " +"create the following files:" +msgstr "" +"Să începem cu o aplicație simplă. La rădăcina unei verificări AOSP, creați " +"următoarele fișiere:" + +#: src/android/build-rules/binary.md:6 src/android/build-rules/library.md:13 +#, fuzzy +msgid "_hello_rust/Android.bp_:" +msgstr "hello_rust/Android.bp_:" + +#: src/android/build-rules/binary.md:10 src/android/build-rules/binary.md:11 +#, fuzzy +msgid "\"hello_rust\"" +msgstr "\"hello_rust\"" + +#: src/android/build-rules/binary.md:12 src/android/build-rules/library.md:19 +#: src/android/logging.md:12 +#, fuzzy +msgid "\"src/main.rs\"" +msgstr "src/main.rs_:" + +#: src/android/build-rules/binary.md:16 src/android/build-rules/library.md:34 +#, fuzzy +msgid "_hello_rust/src/main.rs_:" +msgstr "hello_rust/src/main.rs_:" + +#: src/android/build-rules/binary.md:19 src/android/build-rules/library.md:37 +#, fuzzy +msgid "//! Rust demo.\n" +msgstr "//! Demo Rust.\n" + +#: src/android/build-rules/binary.md:20 src/android/build-rules/library.md:41 +#, fuzzy +msgid "/// Prints a greeting to standard output.\n" +msgstr "/// Tipărește un mesaj de salut pe ieșirea standard.\n" + +#: src/android/build-rules/binary.md:23 src/exercises/chromium/build-rules.md:9 +#, fuzzy +msgid "\"Hello from Rust!\"" +msgstr "\"Bună ziua de la Rust!\"" + +#: src/android/build-rules/binary.md:27 +#, fuzzy +msgid "You can now build, push, and run the binary:" +msgstr "Acum puteți să construiți, să distribuiți și să rulați fișierul binar:" + +#: src/android/build-rules/binary.md:29 +#, fuzzy +msgid "" +"```shell\n" +"m hello_rust\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\" /data/local/tmp\n" +"adb shell /data/local/tmp/hello_rust\n" +"```" +msgstr "" +"```shell\n" +"m hello_rust\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust /data/local/tmp\"\n" +"adb shell /data/local/tmp/hello_rust\n" +"```" + +#: src/android/build-rules/library.md:1 +#, fuzzy +msgid "Rust Libraries" +msgstr "Biblioteci Rust" + +#: src/android/build-rules/library.md:3 +#, fuzzy +msgid "You use `rust_library` to create a new Rust library for Android." +msgstr "" +"Utilizați `rust_library` pentru a crea o nouă bibliotecă Rust pentru Android." + +#: src/android/build-rules/library.md:5 +#, fuzzy +msgid "Here we declare a dependency on two libraries:" +msgstr "Aici declarăm o dependență față de două biblioteci:" + +#: src/android/build-rules/library.md:7 +#, fuzzy +msgid "`libgreeting`, which we define below," +msgstr "`libgreeting`, pe care îl definim mai jos," + +#: src/android/build-rules/library.md:8 +#, fuzzy +msgid "" +"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]" +"(https://cs.android.com/android/platform/superproject/+/master:external/rust/" +"crates/)." +msgstr "" +"`libtextwrap`, care este un crate deja vândut în [`external/rust/crates/`]" +"(https://cs.android.com/android/platform/superproject/+/master:external/rust/" +"crates/)." + +#: src/android/build-rules/library.md:17 src/android/build-rules/library.md:18 +#, fuzzy +msgid "\"hello_rust_with_dep\"" +msgstr "\"hello_rust_with_dep\"" + +#: src/android/build-rules/library.md:21 src/android/build-rules/library.md:28 +#, fuzzy +msgid "\"libgreetings\"" +msgstr "\"libgreetings\"" + +#: src/android/build-rules/library.md:22 +#, fuzzy +msgid "\"libtextwrap\"" +msgstr "\"libtextwrap\"" + +#: src/android/build-rules/library.md:24 +#, fuzzy +msgid "// Need this to avoid dynamic link error.\n" +msgstr "// Este necesar pentru a evita eroarea de link dinamic.\n" + +#: src/android/build-rules/library.md:29 +#, fuzzy +msgid "\"greetings\"" +msgstr "\"Salutări\"" + +#: src/android/build-rules/library.md:30 +#: src/android/aidl/example-service/service.md:28 src/android/testing.md:12 +#: src/android/testing.md:18 src/android/interoperability/java.md:39 +#, fuzzy +msgid "\"src/lib.rs\"" +msgstr "src/main.rs_:" + +#: src/android/build-rules/library.md:48 +#, fuzzy +msgid "_hello_rust/src/lib.rs_:" +msgstr "hello_rust/src/lib.rs_:" + +#: src/android/build-rules/library.md:51 +#, fuzzy +msgid "//! Greeting library.\n" +msgstr "//! Biblioteca de felicitări.\n" + +#: src/android/build-rules/library.md:52 +#, fuzzy +msgid "/// Greet `name`.\n" +msgstr "/// Salutați `name`.\n" + +#: src/android/build-rules/library.md:55 +#, fuzzy +msgid "\"Hello {name}, it is very nice to meet you!\"" +msgstr "\"Bună ziua {name}, mă bucur să vă cunosc!\"" + +#: src/android/build-rules/library.md:59 +#, fuzzy +msgid "You build, push, and run the binary like before:" +msgstr "Construiți, distribuiți și rulați programul binar la fel ca înainte:" + +#: src/android/build-rules/library.md:61 +#, fuzzy +msgid "" +"```shell\n" +"m hello_rust_with_dep\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\" /data/local/" +"tmp\n" +"adb shell /data/local/tmp/hello_rust_with_dep\n" +"```" +msgstr "" +"```shell\n" +"m hello_rust_with_dep\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep /data/local/" +"tmp\"\n" +"adb shell /data/local/tmp/hello_rust_with_dep\n" +"```" + +#: src/android/aidl.md:3 +#, fuzzy +msgid "" +"The [Android Interface Definition Language (AIDL)](https://developer.android." +"com/guide/components/aidl) is supported in Rust:" +msgstr "" +"Limbajul [Android Interface Definition Language (AIDL)](https://developer." +"android.com/guide/components/aidl) este acceptat în Rust:" + +#: src/android/aidl.md:8 +#, fuzzy +msgid "Rust code can call existing AIDL servers," +msgstr "Codul Rust poate apela serverele AIDL existente," + +#: src/android/aidl.md:9 +#, fuzzy +msgid "You can create new AIDL servers in Rust." +msgstr "Puteți crea noi servere AIDL în Rust." + +#: src/android/aidl/birthday-service.md:3 +msgid "" +"To illustrate how to use Rust with Binder, we're going to walk through the " +"process of creating a Binder interface. We're then going to both implement " +"the described service and write client code that talks to that service." +msgstr "" + +#: src/android/aidl/example-service/interface.md:1 +#, fuzzy +msgid "AIDL Interfaces" +msgstr "Interfețe AIDL" + +#: src/android/aidl/example-service/interface.md:3 +#, fuzzy +msgid "You declare the API of your service using an AIDL interface:" +msgstr "Declarați API-ul serviciului dumneavoastră utilizând o interfață AIDL:" + +#: src/android/aidl/example-service/interface.md:5 +#: src/android/aidl/example-service/service-bindings.md:6 +#, fuzzy +msgid "" +"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:" +msgstr "" +"_birthday_service/aidl/com/exemple/birthdayservice/IBirthdayService.aidl_:" + +#: src/android/aidl/example-service/interface.md:8 +#: src/android/aidl/example-service/service-bindings.md:9 +#: src/android/aidl/example-service/changing-definition.md:8 +#, fuzzy +msgid "/** Birthday service interface. */" +msgstr "/** Interfață de serviciu de ziua de naștere. */" + +#: src/android/aidl/example-service/interface.md:10 +#: src/android/aidl/example-service/service-bindings.md:11 +#: src/android/aidl/example-service/changing-definition.md:11 +#, fuzzy +msgid "/** Generate a Happy Birthday message. */" +msgstr "/** Generează un mesaj de \"La mulți ani\". */" + +#: src/android/aidl/example-service/interface.md:15 +#, fuzzy +msgid "_birthday_service/aidl/Android.bp_:" +msgstr "_birthday_service/aidl/Android.bp_:" + +#: src/android/aidl/example-service/interface.md:19 +#, fuzzy +msgid "\"com.example.birthdayservice\"" +msgstr "\"com.example.birthdayservice\"" + +#: src/android/aidl/example-service/interface.md:20 +#, fuzzy +msgid "\"com/example/birthdayservice/*.aidl\"" +msgstr "" +"_birthday_service/aidl/com/exemple/birthdayservice/IBirthdayService.aidl_:" + +#: src/android/aidl/example-service/interface.md:23 +#, fuzzy +msgid "// Rust is not enabled by default\n" +msgstr "// Rust nu este activat în mod implicit\n" + +#: src/android/aidl/example-service/interface.md:32 +msgid "" +"Note that the directory structure under the `aidl/` directory needs to match " +"the package name used in the AIDL file, i.e. the package is `com.example." +"birthdayservice` and the file is at `aidl/com/example/IBirthdayService.aidl`." +msgstr "" + +#: src/android/aidl/example-service/service-bindings.md:1 +msgid "Generated Service API" +msgstr "" + +#: src/android/aidl/example-service/service-bindings.md:3 +msgid "" +"Binder generates a trait corresponding to the interface definition. trait to " +"talk to the service." +msgstr "" + +#: src/android/aidl/example-service/service-bindings.md:16 +#, fuzzy +msgid "_Generated trait_:" +msgstr "Cod Rust generat:" + +#: src/android/aidl/example-service/service-bindings.md:24 +msgid "" +"Your service will need to implement this trait, and your client will use " +"this trait to talk to the service." +msgstr "" + +#: src/android/aidl/example-service/service-bindings.md:29 +msgid "" +"The generated bindings can be found at `out/soong/.intermediates//`." +msgstr "" + +#: src/android/aidl/example-service/service-bindings.md:31 +msgid "" +"Point out how the generated function signature, specifically the argument " +"and return types, correspond the interface definition." +msgstr "" + +#: src/android/aidl/example-service/service-bindings.md:33 +msgid "" +"`String` for an argument results in a different Rust type than `String` as a " +"return type." +msgstr "" + +#: src/android/aidl/example-service/service.md:1 +#, fuzzy +msgid "Service Implementation" +msgstr "Implementarea serviciilor" + +#: src/android/aidl/example-service/service.md:3 +#, fuzzy +msgid "We can now implement the AIDL service:" +msgstr "Acum putem implementa serviciul AIDL:" + +#: src/android/aidl/example-service/service.md:5 +#: src/android/aidl/example-service/changing-implementation.md:5 +#, fuzzy +msgid "_birthday_service/src/lib.rs_:" +msgstr "_birthday_service/src/lib.rs_:" + +#: src/android/aidl/example-service/service.md:10 +#, fuzzy +msgid "/// The `IBirthdayService` implementation.\n" +msgstr "Implementarea serviciilor" + +#: src/android/aidl/example-service/service.md:18 +#: src/android/aidl/example-service/changing-implementation.md:16 +#: src/android/aidl/types/file-descriptor.md:57 +#, fuzzy +msgid "\"Happy Birthday {name}, congratulations with the {years} years!\"" +msgstr "\"La mulți ani {name}, felicitări cu {years} ani!\"" + +#: src/android/aidl/example-service/service.md:23 +#: src/android/aidl/example-service/server.md:28 +#: src/android/aidl/example-service/client.md:31 +#, fuzzy +msgid "_birthday_service/Android.bp_:" +msgstr "_birthday_service/Android.bp_:" + +#: src/android/aidl/example-service/service.md:27 +#: src/android/aidl/example-service/server.md:38 +#, fuzzy +msgid "\"libbirthdayservice\"" +msgstr "_birthday_service/src/lib.rs_:" + +#: src/android/aidl/example-service/service.md:29 +#: src/android/aidl/example-service/server.md:13 +#: src/android/aidl/example-service/client.md:11 +#, fuzzy +msgid "\"birthdayservice\"" +msgstr "_birthday_service/src/lib.rs_:" + +#: src/android/aidl/example-service/service.md:31 +#: src/android/aidl/example-service/server.md:36 +#: src/android/aidl/example-service/client.md:39 +#, fuzzy +msgid "\"com.example.birthdayservice-rust\"" +msgstr "\"com.example.birthdayservice-rust\"" + +#: src/android/aidl/example-service/service.md:32 +#: src/android/aidl/example-service/server.md:37 +#: src/android/aidl/example-service/client.md:40 +#, fuzzy +msgid "\"libbinder_rs\"" +msgstr "\"libbinder_rs\"" + +#: src/android/aidl/example-service/service.md:39 +msgid "" +"Point out the path to the generated `IBirthdayService` trait, and explain " +"why each of the segments is necessary." +msgstr "" + +#: src/android/aidl/example-service/service.md:41 +msgid "" +"TODO: What does the `binder::Interface` trait do? Are there methods to " +"override? Where source?" +msgstr "" + +#: src/android/aidl/example-service/server.md:1 +#, fuzzy +msgid "AIDL Server" +msgstr "Server AIDL" + +#: src/android/aidl/example-service/server.md:3 +#, fuzzy +msgid "Finally, we can create a server which exposes the service:" +msgstr "În cele din urmă, putem crea un server care să expună serviciul:" + +#: src/android/aidl/example-service/server.md:5 +#, fuzzy +msgid "_birthday_service/src/server.rs_:" +msgstr "_birthday_service/src/server.rs_:" + +#: src/android/aidl/example-service/server.md:8 +#, fuzzy +msgid "//! Birthday service.\n" +msgstr "//! Slujbă de ziua de naștere.\n" + +#: src/android/aidl/example-service/server.md:14 +#, fuzzy +msgid "/// Entry point for birthday service.\n" +msgstr "/// Punct de intrare pentru serviciul de aniversare.\n" + +#: src/android/aidl/example-service/server.md:23 +#, fuzzy +msgid "\"Failed to register service\"" +msgstr "\"Nu a reușit să înregistreze serviciul\"" + +#: src/android/aidl/example-service/server.md:32 +#: src/android/aidl/example-service/server.md:33 +#, fuzzy +msgid "\"birthday_server\"" +msgstr "_birthday_service/src/lib.rs_:" + +#: src/android/aidl/example-service/server.md:34 +#, fuzzy +msgid "\"src/server.rs\"" +msgstr "src/bin/server.rs_:" + +#: src/android/aidl/example-service/server.md:40 +#: src/android/aidl/example-service/client.md:42 +#, fuzzy +msgid "// To avoid dynamic link error.\n" +msgstr "// Pentru a evita eroarea de legătură dinamică.\n" + +#: src/android/aidl/example-service/server.md:46 +msgid "" +"The process for taking a user-defined service implementation (in this case " +"the `BirthdayService` type, which implements the `IBirthdayService`) and " +"starting it as a Binder service has multiple steps, and may appear more " +"complicated than students are used to if they've used Binder from C++ or " +"another language. Explain to students why each step is necessary." +msgstr "" + +#: src/android/aidl/example-service/server.md:52 +msgid "Create an instance of your service type (`BirthdayService`)." +msgstr "" + +#: src/android/aidl/example-service/server.md:53 +msgid "" +"Wrap the service object in corresponding `Bn*` type (`BnBirthdayService` in " +"this case). This type is generated by Binder and provides the common Binder " +"functionality that would be provided by the `BnBinder` base class in C++. We " +"don't have inheritance in Rust, so instead we use composition, putting our " +"`BirthdayService` within the generated `BnBinderService`." +msgstr "" + +#: src/android/aidl/example-service/server.md:58 +msgid "" +"Call `add_service`, giving it a service identifier and your service object " +"(the `BnBirthdayService` object in the example)." +msgstr "" + +#: src/android/aidl/example-service/server.md:60 +msgid "" +"Call `join_thread_pool` to add the current thread to Binder's thread pool " +"and start listening for connections." +msgstr "" + +#: src/android/aidl/example-service/deploy.md:3 +#, fuzzy +msgid "We can now build, push, and start the service:" +msgstr "Acum putem construi, împinge și porni serviciul:" + +#: src/android/aidl/example-service/deploy.md:5 +#, fuzzy +msgid "" +"```shell\n" +"m birthday_server\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\" /data/local/" +"tmp\n" +"adb root\n" +"adb shell /data/local/tmp/birthday_server\n" +"```" +msgstr "" +"```shell\n" +"m birthday_server\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_server /data/local/" +"tmp\"\n" +"adb shell /data/local/tmp/birthday_server\n" +"```" + +#: src/android/aidl/example-service/deploy.md:12 +#, fuzzy +msgid "In another terminal, check that the service runs:" +msgstr "Într-un alt terminal, verificați dacă serviciul rulează:" + +#: src/android/aidl/example-service/deploy.md:22 +#, fuzzy +msgid "You can also call the service with `service call`:" +msgstr "De asemenea, puteți apela serviciul cu `service call`:" + +#: src/android/aidl/example-service/client.md:1 +#, fuzzy +msgid "AIDL Client" +msgstr "Client AIDL" + +#: src/android/aidl/example-service/client.md:3 +#, fuzzy +msgid "Finally, we can create a Rust client for our new service." +msgstr "" +"În cele din urmă, putem crea un client Rust pentru noul nostru serviciu." + +#: src/android/aidl/example-service/client.md:5 +#: src/android/aidl/example-service/changing-implementation.md:29 +#, fuzzy +msgid "_birthday_service/src/client.rs_:" +msgstr "_birthday_service/src/client.rs_:" + +#: src/android/aidl/example-service/client.md:12 +#, fuzzy +msgid "/// Call the birthday service.\n" +msgstr "/// Apelarea serviciului de aniversare.\n" + +#: src/android/aidl/example-service/client.md:23 +#: src/android/aidl/types/objects.md:54 +#: src/android/aidl/types/parcelables.md:32 +#: src/android/aidl/types/file-descriptor.md:20 +#, fuzzy +msgid "\"Failed to connect to BirthdayService\"" +msgstr "\"Nu a reușit să se conecteze la BirthdayService\"" + +#: src/android/aidl/example-service/client.md:25 +#, fuzzy +msgid "// Call the service.\n" +msgstr "/// Apelarea serviciului de aniversare.\n" + +#: src/android/aidl/example-service/client.md:27 +#, fuzzy +msgid "\"{msg}\"" +msgstr "" +"```rust,editable\n" +"enum Result {\n" +" Ok(i32),\n" +" Err(String),\n" +"}\n" +"\n" +"fn divide_in_two(n: i32) -> Result {\n" +" if n % 2 == 0 {\n" +" Result::Ok(n / 2)\n" +" } else {\n" +" Result::Err(format!(\"nu se poate împărți {n} în două părți " +"egale\"))\n" +" }\n" +"}\n" +"\n" +"fn main() {\n" +" let n = 100;\n" +" match divide_in_two(n) {\n" +" Result::Ok(half) => println!(\"{n} împărțit la doi este {half}\"),\n" +" Result::Err(msg) => println!(\"regret, a apărut o eroare: {msg}\"),\n" +" }\n" +"}\n" +"```" + +#: src/android/aidl/example-service/client.md:35 +#: src/android/aidl/example-service/client.md:36 +#, fuzzy +msgid "\"birthday_client\"" +msgstr "_birthday_service/src/client.rs_:" + +#: src/android/aidl/example-service/client.md:37 +#, fuzzy +msgid "\"src/client.rs\"" +msgstr "src/bin/client.rs_:" + +#: src/android/aidl/example-service/client.md:46 +#, fuzzy +msgid "Notice that the client does not depend on `libbirthdayservice`." +msgstr "Observați că clientul nu depinde de `libbirthdayservice`." + +#: src/android/aidl/example-service/client.md:48 +#, fuzzy +msgid "Build, push, and run the client on your device:" +msgstr "Creați, distribuiți și rulați clientul pe dispozitivul dvs:" + +#: src/android/aidl/example-service/client.md:50 +#, fuzzy +msgid "" +"```shell\n" +"m birthday_client\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\" /data/local/" +"tmp\n" +"adb shell /data/local/tmp/birthday_client Charlie 60\n" +"```" +msgstr "" +"```shell\n" +"m birthday_client\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_client /data/local/" +"tmp\"\n" +"adb shell /data/local/tmp/birthday_client Charlie 60\n" +"```" + +#: src/android/aidl/example-service/client.md:62 +msgid "" +"`Strong` is the trait object representing the service " +"that the client has connected to." +msgstr "" + +#: src/android/aidl/example-service/client.md:64 +msgid "" +"`Strong` is a custom smart pointer type for Binder. It handles both an in-" +"process ref count for the service trait object, and the global Binder ref " +"count that tracks how many processes have a reference to the object." +msgstr "" + +#: src/android/aidl/example-service/client.md:67 +msgid "" +"Note that the trait object that the client uses to talk to the service uses " +"the exact same trait that the server implements. For a given Binder " +"interface, there is a single Rust trait generated that both client and " +"server use." +msgstr "" + +#: src/android/aidl/example-service/client.md:71 +msgid "" +"Use the same service identifier used when registering the service. This " +"should ideally be defined in a common crate that both the client and server " +"can depend on." +msgstr "" + +#: src/android/aidl/example-service/changing-definition.md:3 +#, fuzzy +msgid "" +"Let us extend the API with more functionality: we want to let clients " +"specify a list of lines for the birthday card:" +msgstr "" +"Să extindem API-ul cu mai multe funcționalități: dorim să permitem " +"clienților să specifice o listă de linii pentru felicitarea de ziua de " +"naștere:" + +#: src/android/aidl/example-service/changing-definition.md:16 +msgid "This results in an updated trait definition for `IBirthdayService`:" +msgstr "" + +#: src/android/aidl/example-service/changing-definition.md:31 +msgid "" +"Note how the `String[]` in the AIDL definition is translated as a " +"`&[String]` in Rust, i.e. that idiomatic Rust types are used in the " +"generated bindings wherever possible:" +msgstr "" + +#: src/android/aidl/example-service/changing-definition.md:34 +msgid "`in` array arguments are translated to slices." +msgstr "" + +#: src/android/aidl/example-service/changing-definition.md:35 +msgid "`out` and `inout` args are translated to `&mut Vec`." +msgstr "" + +#: src/android/aidl/example-service/changing-definition.md:36 +msgid "Return values are translated to returning a `Vec`." +msgstr "" + +#: src/android/aidl/example-service/changing-implementation.md:1 +msgid "Updating Client and Service" +msgstr "" -#: src/android/build-rules.md -#, fuzzy -msgid "" -"Generates source and produces a Rust library containing Rust bindings to C " -"libraries." +#: src/android/aidl/example-service/changing-implementation.md:3 +msgid "Update the client and server code to account for the new API." msgstr "" -"Generează sursa și produce o bibliotecă Rust care conține legături Rust " -"pentru bibliotecile C." -#: src/android/build-rules.md +#: src/android/aidl/example-service/changing-implementation.md:20 #, fuzzy -msgid "We will look at `rust_binary` and `rust_library` next." -msgstr "În continuare vom analiza `rust_binary` și `rust_library`." +msgid "'\\n'" +msgstr "b'\\n'" -#: src/android/build-rules.md -msgid "Additional items speaker may mention:" +#: src/android/aidl/example-service/changing-implementation.md:36 +msgid "\"Habby birfday to yuuuuu\"" msgstr "" -#: src/android/build-rules.md -msgid "" -"Cargo is not optimized for multi-language repos, and also downloads packages " -"from the internet." +#: src/android/aidl/example-service/changing-implementation.md:37 +msgid "\"And also: many more\"" msgstr "" -#: src/android/build-rules.md +#: src/android/aidl/example-service/changing-implementation.md:44 msgid "" -"For compliance and performance, Android must have crates in-tree. It must " -"also interop with C/C++/Java code. Soong fills that gap." +"TODO: Move code snippets into project files where they'll actually be built?" msgstr "" -#: src/android/build-rules.md -msgid "" -"Soong has many similarities to Bazel, which is the open-source variant of " -"Blaze (used in google3)." +#: src/android/aidl/types.md:1 +msgid "Working With AIDL Types" 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." +#: src/android/aidl/types.md:3 +msgid "AIDL types translate into the appropriate idiomatic Rust type:" msgstr "" -#: src/android/build-rules.md -msgid "Learning Bazel-like build rules is useful for all Rust OS developers." +#: src/android/aidl/types.md:5 +msgid "Primitive types map (mostly) to idiomatic Rust types." msgstr "" -#: src/android/build-rules.md -msgid "Fun fact: Data from Star Trek is a Soong-type Android." +#: src/android/aidl/types.md:6 +msgid "Collection types like slices, `Vec`s and string types are supported." msgstr "" -#: src/android/build-rules/binary.md -#, fuzzy -msgid "Rust Binaries" -msgstr "Binare Rust" - -#: src/android/build-rules/binary.md -#, fuzzy +#: src/android/aidl/types.md:7 msgid "" -"Let us start with a simple application. At the root of an AOSP checkout, " -"create the following files:" +"References to AIDL objects and file handles can be sent between clients and " +"services." msgstr "" -"Să începem cu o aplicație simplă. La rădăcina unei verificări AOSP, creați " -"următoarele fișiere:" -#: src/android/build-rules/binary.md src/android/build-rules/library.md -#, fuzzy -msgid "_hello_rust/Android.bp_:" -msgstr "hello_rust/Android.bp_:" +#: src/android/aidl/types.md:9 +msgid "File handles and parcelables are fully supported." +msgstr "" -#: src/android/build-rules/binary.md -msgid "\"hello_rust\"" +#: src/android/aidl/types/primitives.md:3 +msgid "Primitive types map (mostly) idiomatically:" msgstr "" -#: src/android/build-rules/binary.md src/android/build-rules/library.md -#: src/android/logging.md +#: src/android/aidl/types/primitives.md:5 #, fuzzy -msgid "\"src/main.rs\"" -msgstr "src/main.rs_:" +msgid "AIDL Type" +msgstr "AIDL" -#: src/android/build-rules/binary.md src/android/build-rules/library.md +#: src/android/aidl/types/primitives.md:5 src/android/aidl/types/arrays.md:7 +#: src/android/interoperability/cpp/type-mapping.md:3 #, fuzzy -msgid "_hello_rust/src/main.rs_:" -msgstr "hello_rust/src/main.rs_:" +msgid "Rust Type" +msgstr "Rugină prin exemplu" -#: src/android/build-rules/binary.md src/android/build-rules/library.md -msgid "//! Rust demo.\n" +#: src/android/aidl/types/primitives.md:5 +msgid "Note" msgstr "" -#: src/android/build-rules/binary.md src/android/build-rules/library.md -msgid "/// Prints a greeting to standard output.\n" +#: src/android/aidl/types/primitives.md:7 +#, fuzzy +msgid "`boolean`" +msgstr "`bool`" + +#: src/android/aidl/types/primitives.md:8 +msgid "`byte`" msgstr "" -#: src/android/build-rules/binary.md src/exercises/chromium/build-rules.md -msgid "\"Hello from Rust!\"" +#: src/android/aidl/types/primitives.md:8 +msgid "`i8`" msgstr "" -#: src/android/build-rules/binary.md +#: src/android/aidl/types/primitives.md:8 #, fuzzy -msgid "You can now build, push, and run the binary:" -msgstr "Acum puteți să construiți, să distribuiți și să rulați fișierul binar:" +msgid "Note that bytes are signed." +msgstr "// Mai mult de 7 octeți este invalid.\n" -#: src/android/build-rules/binary.md -#, fuzzy -msgid "" -"```shell\n" -"m hello_rust\n" -"adb push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust\" /data/local/tmp\n" -"adb shell /data/local/tmp/hello_rust\n" -"```" +#: src/android/aidl/types/primitives.md:9 +msgid "`u16`" msgstr "" -"```shell\n" -"m hello_rust\n" -"adb push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust /data/local/tmp\"\n" -"adb shell /data/local/tmp/hello_rust\n" -"```" -#: src/android/build-rules/library.md -#, fuzzy -msgid "Rust Libraries" -msgstr "Biblioteci Rust" +#: src/android/aidl/types/primitives.md:9 +msgid "Note the usage of `u16`, NOT `u32`." +msgstr "" -#: src/android/build-rules/library.md -#, fuzzy -msgid "You use `rust_library` to create a new Rust library for Android." +#: src/android/aidl/types/primitives.md:10 +msgid "`int`" msgstr "" -"Utilizați `rust_library` pentru a crea o nouă bibliotecă Rust pentru Android." -#: src/android/build-rules/library.md -#, fuzzy -msgid "Here we declare a dependency on two libraries:" -msgstr "Aici declarăm o dependență față de două biblioteci:" +#: src/android/aidl/types/primitives.md:10 +msgid "`i32`" +msgstr "" -#: src/android/build-rules/library.md -#, fuzzy -msgid "`libgreeting`, which we define below," -msgstr "`libgreeting`, pe care îl definim mai jos," +#: src/android/aidl/types/primitives.md:11 +msgid "`long`" +msgstr "" -#: src/android/build-rules/library.md -#, fuzzy -msgid "" -"`libtextwrap`, which is a crate already vendored in [`external/rust/crates/`]" -"(https://cs.android.com/android/platform/superproject/+/master:external/rust/" -"crates/)." +#: src/android/aidl/types/primitives.md:11 +msgid "`i64`" msgstr "" -"`libtextwrap`, care este un crate deja vândut în [`external/rust/crates/`]" -"(https://cs.android.com/android/platform/superproject/+/master:external/rust/" -"crates/)." -#: src/android/build-rules/library.md -msgid "\"hello_rust_with_dep\"" +#: src/android/aidl/types/primitives.md:12 +msgid "`float`" msgstr "" -#: src/android/build-rules/library.md -msgid "\"libgreetings\"" +#: src/android/aidl/types/primitives.md:12 +msgid "`f32`" msgstr "" -#: src/android/build-rules/library.md -msgid "\"libtextwrap\"" +#: src/android/aidl/types/primitives.md:13 +msgid "`double`" msgstr "" -#: src/android/build-rules/library.md -msgid "// Need this to avoid dynamic link error.\n" +#: src/android/aidl/types/primitives.md:13 +msgid "`f64`" msgstr "" -#: src/android/build-rules/library.md -msgid "\"greetings\"" +#: src/android/aidl/types/arrays.md:3 +msgid "" +"The array types (`T[]`, `byte[]`, and `List`) get translated to the " +"appropriate Rust array type depending on how they are used in the function " +"signature:" msgstr "" -#: src/android/build-rules/library.md src/android/aidl/implementation.md -#: src/android/interoperability/java.md +#: src/android/aidl/types/arrays.md:7 #, fuzzy -msgid "\"src/lib.rs\"" -msgstr "src/main.rs_:" +msgid "Position" +msgstr "Descriere" -#: src/android/build-rules/library.md +#: src/android/aidl/types/arrays.md:9 #, fuzzy -msgid "_hello_rust/src/lib.rs_:" -msgstr "hello_rust/src/lib.rs_:" +msgid "`in` argument" +msgstr "argument:" -#: src/android/build-rules/library.md -msgid "//! Greeting library.\n" +#: src/android/aidl/types/arrays.md:9 +#, fuzzy +msgid "`&[T]`" +msgstr "Partiții: `&[T]`" + +#: src/android/aidl/types/arrays.md:10 +msgid "`out`/`inout` argument" msgstr "" -#: src/android/build-rules/library.md -msgid "/// Greet `name`.\n" +#: src/android/aidl/types/arrays.md:10 +#, fuzzy +msgid "`&mut Vec`" +msgstr "`Vec`" + +#: src/android/aidl/types/arrays.md:11 +#, fuzzy +msgid "Return" +msgstr "retur:" + +#: src/android/aidl/types/arrays.md:11 +#: src/android/interoperability/cpp/type-mapping.md:11 +#, fuzzy +msgid "`Vec`" +msgstr "`Vec`" + +#: src/android/aidl/types/arrays.md:15 +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." msgstr "" -#: src/android/build-rules/library.md -msgid "\"Hello {name}, it is very nice to meet you!\"" +#: src/android/aidl/types/arrays.md:18 +msgid "Arrays in parcelable fields always get translated to `Vec`." msgstr "" -#: src/android/build-rules/library.md -#, fuzzy -msgid "You build, push, and run the binary like before:" -msgstr "Construiți, distribuiți și rulați programul binar la fel ca înainte:" +#: src/android/aidl/types/objects.md:3 +msgid "" +"AIDL objects can be sent either as a concrete AIDL type or as the type-" +"erased `IBinder` interface:" +msgstr "" -#: src/android/build-rules/library.md +#: src/android/aidl/types/objects.md:6 #, fuzzy msgid "" -"```shell\n" -"m hello_rust_with_dep\n" -"adb push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep\" /data/local/" -"tmp\n" -"adb shell /data/local/tmp/hello_rust_with_dep\n" -"```" +"**birthday_service/aidl/com/example/birthdayservice/IBirthdayInfoProvider." +"aidl**:" msgstr "" -"```shell\n" -"m hello_rust_with_dep\n" -"adb push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep /data/local/" -"tmp\"\n" -"adb shell /data/local/tmp/hello_rust_with_dep\n" -"```" +"_birthday_service/aidl/com/exemple/birthdayservice/IBirthdayService.aidl_:" -#: src/android/aidl.md +#: src/android/aidl/types/objects.md:17 +#: src/android/aidl/types/parcelables.md:16 +#: src/android/aidl/types/file-descriptor.md:6 #, fuzzy msgid "" -"The [Android Interface Definition Language (AIDL)](https://developer.android." -"com/guide/components/aidl) is supported in Rust:" +"**birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl**:" +msgstr "" +"_birthday_service/aidl/com/exemple/birthdayservice/IBirthdayService.aidl_:" + +#: src/android/aidl/types/objects.md:23 +msgid "/** The same thing, but using a binder object. */" +msgstr "" + +#: src/android/aidl/types/objects.md:26 +msgid "/** The same thing, but using `IBinder`. */" msgstr "" -"Limbajul [Android Interface Definition Language (AIDL)](https://developer." -"android.com/guide/components/aidl) este acceptat în Rust:" -#: src/android/aidl.md +#: src/android/aidl/types/objects.md:31 +#: src/android/aidl/types/parcelables.md:27 +#: src/android/aidl/types/file-descriptor.md:15 #, fuzzy -msgid "Rust code can call existing AIDL servers," -msgstr "Codul Rust poate apela serverele AIDL existente," +msgid "**birthday_service/src/client.rs**:" +msgstr "_birthday_service/src/client.rs_:" -#: src/android/aidl.md +#: src/android/aidl/types/objects.md:34 #, fuzzy -msgid "You can create new AIDL servers in Rust." -msgstr "Puteți crea noi servere AIDL în Rust." +msgid "/// Rust struct implementing the `IBirthdayInfoProvider` interface.\n" +msgstr "//! Implementarea interfeței AIDL `IBirthdayService`.\n" -#: src/android/aidl/interface.md +#: src/android/aidl/types/objects.md:56 #, fuzzy -msgid "AIDL Interfaces" -msgstr "Interfețe AIDL" +msgid "// Create a binder object for the `IBirthdayInfoProvider` interface.\n" +msgstr "//! Implementarea interfeței AIDL `IBirthdayService`.\n" -#: src/android/aidl/interface.md +#: src/android/aidl/types/objects.md:62 #, fuzzy -msgid "You declare the API of your service using an AIDL interface:" -msgstr "Declarați API-ul serviciului dumneavoastră utilizând o interfață AIDL:" +msgid "// Send the binder object to the service.\n" +msgstr "/// Apelarea serviciului de aniversare.\n" + +#: src/android/aidl/types/objects.md:65 +msgid "" +"// Perform the same operation but passing the provider as an `SpIBinder`.\n" +msgstr "" + +#: src/android/aidl/types/objects.md:72 +msgid "" +"Note the usage of `BnBirthdayInfoProvider`. This serves the same purpose as " +"`BnBirthdayService` that we saw previously." +msgstr "" -#: src/android/aidl/interface.md +#: src/android/aidl/types/parcelables.md:3 +msgid "Binder for Rust supports sending parcelables directly:" +msgstr "" + +#: src/android/aidl/types/parcelables.md:5 #, fuzzy msgid "" -"_birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl_:" +"**birthday_service/aidl/com/example/birthdayservice/BirthdayInfo.aidl**:" msgstr "" "_birthday_service/aidl/com/exemple/birthdayservice/IBirthdayService.aidl_:" -#: src/android/aidl/interface.md src/android/aidl/changing.md -msgid "/** Birthday service interface. */" +#: src/android/aidl/types/parcelables.md:22 +msgid "/** The same thing, but with a parcelable. */" msgstr "" -#: src/android/aidl/interface.md src/android/aidl/changing.md -msgid "/** Generate a Happy Birthday message. */" +#: src/android/aidl/types/file-descriptor.md:3 +msgid "" +"Files can be sent between Binder clients/servers using the " +"`ParcelFileDescriptor` type:" msgstr "" -#: src/android/aidl/interface.md -#, fuzzy -msgid "_birthday_service/aidl/Android.bp_:" -msgstr "_birthday_service/aidl/Android.bp_:" +#: src/android/aidl/types/file-descriptor.md:10 +msgid "/** The same thing, but loads info from a file. */" +msgstr "" -#: src/android/aidl/interface.md -msgid "\"com.example.birthdayservice\"" +#: src/android/aidl/types/file-descriptor.md:22 +msgid "// Open a file and put the birthday info in it.\n" +msgstr "" + +#: src/android/aidl/types/file-descriptor.md:23 +msgid "\"/data/local/tmp/birthday.info\"" msgstr "" -#: src/android/aidl/interface.md +#: src/android/aidl/types/file-descriptor.md:24 #, fuzzy -msgid "\"com/example/birthdayservice/*.aidl\"" +msgid "\"{name}\"" +msgstr "\"Bună ziua {name}\"" + +#: src/android/aidl/types/file-descriptor.md:25 +msgid "\"{years}\"" msgstr "" -"_birthday_service/aidl/com/exemple/birthdayservice/IBirthdayService.aidl_:" -#: src/android/aidl/interface.md -msgid "// Rust is not enabled by default\n" +#: src/android/aidl/types/file-descriptor.md:27 +msgid "// Create a `ParcelFileDescriptor` from the file and send it.\n" msgstr "" -#: src/android/aidl/interface.md +#: src/android/aidl/types/file-descriptor.md:33 #, fuzzy +msgid "**birthday_service/src/lib.rs**:" +msgstr "_birthday_service/src/lib.rs_:" + +#: src/android/aidl/types/file-descriptor.md:41 msgid "" -"Add `vendor_available: true` if your AIDL file is used by a binary in the " -"vendor partition." +"// Convert the file descriptor to a `File`. `ParcelFileDescriptor` wraps\n" +" // an `OwnedFd`, which can be cloned and then used to create a " +"`File`\n" +" // object.\n" msgstr "" -"Adăugați `vendor_available: true` dacă fișierul dvs. AIDL este utilizat de " -"un fișier binar din partiția furnizorului." -#: src/android/aidl/implementation.md +#: src/android/aidl/types/file-descriptor.md:48 #, fuzzy -msgid "Service Implementation" -msgstr "Implementarea serviciilor" +msgid "\"Invalid file handle\"" +msgstr "\"Lungime invalidă\"" + +#: src/android/aidl/types/file-descriptor.md:64 +msgid "" +"`ParcelFileDescriptor` wraps an `OwnedFd`, and so can be created from a " +"`File` (or any other type that wraps an `OwnedFd`), and can be used to " +"create a new `File` handle on the other side." +msgstr "" -#: src/android/aidl/implementation.md +#: src/android/aidl/types/file-descriptor.md:67 +msgid "" +"Other types of file descriptors can be wrapped and sent, e.g. TCP, UDP, and " +"UNIX sockets." +msgstr "" + +#: src/android/testing.md:1 #, fuzzy -msgid "We can now implement the AIDL service:" -msgstr "Acum putem implementa serviciul AIDL:" +msgid "Testing in Android" +msgstr "Rust în Android" + +#: src/android/testing.md:3 +msgid "" +"Building on [Testing](../testing.md), we will now look at how unit tests " +"work in AOSP. Use the `rust_test` module for your unit tests:" +msgstr "" -#: src/android/aidl/implementation.md +#: src/android/testing.md:6 #, fuzzy -msgid "_birthday_service/src/lib.rs_:" -msgstr "_birthday_service/src/lib.rs_:" +msgid "_testing/Android.bp_:" +msgstr "hello_rust/Android.bp_:" -#: src/android/aidl/implementation.md -msgid "//! Implementation of the `IBirthdayService` AIDL interface.\n" +#: src/android/testing.md:10 +#, fuzzy +msgid "\"libleftpad\"" +msgstr "\"libtextwrap\"" + +#: src/android/testing.md:11 +msgid "\"leftpad\"" msgstr "" -#: src/android/aidl/implementation.md +#: src/android/testing.md:16 #, fuzzy -msgid "/// The `IBirthdayService` implementation.\n" -msgstr "Implementarea serviciilor" +msgid "\"libleftpad_test\"" +msgstr "\"libbirthday_bindgen_test\"" -#: src/android/aidl/implementation.md -msgid "\"Happy Birthday {name}, congratulations with the {years} years!\"" +#: src/android/testing.md:17 +msgid "\"leftpad_test\"" msgstr "" -#: src/android/aidl/implementation.md src/android/aidl/server.md -#: src/android/aidl/client.md +#: src/android/testing.md:20 src/android/interoperability/with-c/bindgen.md:113 #, fuzzy -msgid "_birthday_service/Android.bp_:" -msgstr "_birthday_service/Android.bp_:" +msgid "\"general-tests\"" +msgstr "Rust nesigur" -#: src/android/aidl/implementation.md src/android/aidl/server.md +#: src/android/testing.md:24 #, fuzzy -msgid "\"libbirthdayservice\"" -msgstr "_birthday_service/src/lib.rs_:" +msgid "_testing/src/lib.rs_:" +msgstr "hello_rust/src/lib.rs_:" -#: src/android/aidl/implementation.md src/android/aidl/server.md -#: src/android/aidl/client.md +#: src/android/testing.md:27 #, fuzzy -msgid "\"birthdayservice\"" -msgstr "_birthday_service/src/lib.rs_:" +msgid "//! Left-padding library.\n" +msgstr "//! Biblioteca de felicitări.\n" -#: src/android/aidl/implementation.md src/android/aidl/server.md -#: src/android/aidl/client.md -msgid "\"com.example.birthdayservice-rust\"" +#: src/android/testing.md:28 +msgid "/// Left-pad `s` to `width`.\n" msgstr "" -#: src/android/aidl/implementation.md src/android/aidl/server.md -#: src/android/aidl/client.md -msgid "\"libbinder_rs\"" -msgstr "" +#: src/android/testing.md:31 +#, fuzzy +msgid "\"{s:>width$}\"" +msgstr "\"|{:^width$}|\"" -#: src/android/aidl/server.md +#: src/android/testing.md:40 #, fuzzy -msgid "AIDL Server" -msgstr "Server AIDL" +msgid "\" foo\"" +msgstr "\"foo\"" -#: src/android/aidl/server.md +#: src/android/testing.md:45 #, fuzzy -msgid "Finally, we can create a server which exposes the service:" -msgstr "În cele din urmă, putem crea un server care să expună serviciul:" +msgid "\"foobar\"" +msgstr "\"foo\"" -#: src/android/aidl/server.md +#: src/android/testing.md:50 #, fuzzy -msgid "_birthday_service/src/server.rs_:" -msgstr "_birthday_service/src/server.rs_:" +msgid "You can now run the test with" +msgstr "Acum puteți să generați automat legăturile:" -#: src/android/aidl/server.md src/android/aidl/client.md -msgid "//! Birthday service.\n" +#: src/android/testing.md:56 +#, fuzzy +msgid "The output looks like this:" +msgstr "Abordarea generală arată în felul următor:" + +#: src/android/testing.md:58 +msgid "" +"```text\n" +"INFO: Elapsed time: 2.666s, Critical Path: 2.40s\n" +"INFO: 3 processes: 2 internal, 1 linux-sandbox.\n" +"INFO: Build completed successfully, 3 total actions\n" +"//comprehensive-rust-android/testing:libleftpad_test_host PASSED " +"in 2.3s\n" +" PASSED libleftpad_test.tests::long_string (0.0s)\n" +" PASSED libleftpad_test.tests::short_string (0.0s)\n" +"Test cases: finished with 2 passing and 0 failing out of 2 test cases\n" +"```" msgstr "" -#: src/android/aidl/server.md -msgid "/// Entry point for birthday service.\n" +#: src/android/testing.md:68 +msgid "" +"Notice how you only mention the root of the library crate. Tests are found " +"recursively in nested modules." msgstr "" -#: src/android/aidl/server.md -msgid "\"Failed to register service\"" +#: src/android/testing/googletest.md:3 +#, fuzzy +msgid "" +"The [GoogleTest](https://docs.rs/googletest/) crate allows for flexible test " +"assertions using _matchers_:" msgstr "" +"[googletest](https://docs.rs/googletest): Bibliotecă cuprinzătoare de " +"testare a afirmațiilor de testare în tradiția GoogleTest pentru C++." -#: src/android/aidl/server.md +#: src/android/testing/googletest.md:11 #, fuzzy -msgid "\"birthday_server\"" -msgstr "_birthday_service/src/lib.rs_:" +msgid "\"baz\"" +msgstr "\"baz\"" -#: src/android/aidl/server.md +#: src/android/testing/googletest.md:12 #, fuzzy -msgid "\"src/server.rs\"" -msgstr "src/bin/server.rs_:" +msgid "\"xyz\"" +msgstr "\"xyz\"" -#: src/android/aidl/server.md src/android/aidl/client.md -msgid "// To avoid dynamic link error.\n" +#: src/android/testing/googletest.md:16 +#, fuzzy +msgid "" +"If we change the last element to `\"!\"`, the test fails with a structured " +"error message pin-pointing the error:" msgstr "" +"Dacă schimbăm ultimul element în `\"!\"`, testul eșuează cu un mesaj de " +"eroare structurat care indică eroarea:" -#: src/android/aidl/deploy.md +#: src/android/testing/googletest.md:37 #, fuzzy -msgid "We can now build, push, and start the service:" -msgstr "Acum putem construi, împinge și porni serviciul:" +msgid "" +"GoogleTest is not part of the Rust Playground, so you need to run this " +"example in a local environment. Use `cargo add googletest` to quickly add it " +"to an existing Cargo project." +msgstr "" +"GoogleTest nu face parte din Rust Playground, așa că trebuie să executați " +"acest exemplu într-un mediu local. Utilizați `cargo add googletest` pentru a-" +"l adăuga rapid la un proiect Cargo existent." -#: src/android/aidl/deploy.md +#: src/android/testing/googletest.md:41 #, fuzzy msgid "" -"```shell\n" -"m birthday_server\n" -"adb push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_server\" /data/local/" -"tmp\n" -"adb root\n" -"adb shell /data/local/tmp/birthday_server\n" -"```" +"The `use googletest::prelude::*;` line imports a number of [commonly used " +"macros and types](https://docs.rs/googletest/latest/googletest/prelude/index." +"html)." msgstr "" -"```shell\n" -"m birthday_server\n" -"adb push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_server /data/local/" -"tmp\"\n" -"adb shell /data/local/tmp/birthday_server\n" -"```" +"Linia `use googletest::prelude::*;` importă un număr de [macros și tipuri " +"utilizate în mod obișnuit](https://docs.rs/googletest/latest/googletest/" +"prelude/index.html)." -#: src/android/aidl/deploy.md +#: src/android/testing/googletest.md:44 #, fuzzy -msgid "In another terminal, check that the service runs:" -msgstr "Într-un alt terminal, verificați dacă serviciul rulează:" +msgid "This just scratches the surface, there are many builtin matchers." +msgstr "" +"Acest lucru este doar o mică parte, deoarece există numeroase elemente de " +"potrivire încorporate." -#: src/android/aidl/deploy.md +#: src/android/testing/googletest.md:46 #, fuzzy -msgid "You can also call the service with `service call`:" -msgstr "De asemenea, puteți apela serviciul cu `service call`:" +msgid "" +"A particularly nice feature is that mismatches in multi-line strings are " +"shown as a diff:" +msgstr "" +"O caracteristică deosebit de plăcută este faptul că neconcordanțele în " +"șirurile de caractere de mai multe linii sunt afișate sub forma unui dif:" -#: src/android/aidl/client.md +#: src/android/testing/googletest.md:52 #, fuzzy -msgid "AIDL Client" -msgstr "Client AIDL" +msgid "" +"\"Memory safety found,\\n\\\n" +" Rust's strong typing guides the way,\\n\\\n" +" Secure code you'll write.\"" +msgstr "" +"\"Memory safety found,\\n\\\n" +" Tiparea puternică a lui Rust ne ghidează în acest sens\n" +" Cod sigur pe care îl veți scrie.\"" -#: src/android/aidl/client.md +#: src/android/testing/googletest.md:57 #, fuzzy -msgid "Finally, we can create a Rust client for our new service." +msgid "" +"\"Memory safety found,\\n\\\n" +" Rust's silly humor guides the way,\\n\\\n" +" Secure code you'll write.\"" msgstr "" -"În cele din urmă, putem crea un client Rust pentru noul nostru serviciu." +"\"Memory safety found,\\n\\\n" +" Umorul caraghios al lui Rust ne ghidează în acest sens\n" +" Cod sigur pe care îl vei scrie.\"" -#: src/android/aidl/client.md +#: src/android/testing/googletest.md:64 #, fuzzy -msgid "_birthday_service/src/client.rs_:" -msgstr "_birthday_service/src/client.rs_:" - -#: src/android/aidl/client.md -msgid "/// Connect to the BirthdayService.\n" -msgstr "" +msgid "shows a color-coded diff (colors not shown here):" +msgstr "prezintă o diferență de culori (culorile nu sunt prezentate aici):" -#: src/android/aidl/client.md -msgid "/// Call the birthday service.\n" +#: src/android/testing/googletest.md:81 +#, fuzzy +msgid "" +"The crate is a Rust port of [GoogleTest for C++](https://google.github.io/" +"googletest/)." msgstr "" +"Crate este un port Rust al [GoogleTest for C++](https://google.github.io/" +"googletest/)." -#: src/android/aidl/client.md -msgid "\"Failed to connect to BirthdayService\"" +#: src/android/testing/mocking.md:3 +#, fuzzy +msgid "" +"For mocking, [Mockall](https://docs.rs/mockall/) is a widely used library. " +"You need to refactor your code to use traits, which you can then quickly " +"mock:" msgstr "" +"Pentru mocking, [Mockall](https://docs.rs/mockall/) este o bibliotecă " +"utilizată pe scară largă. Trebuie să vă refactorizați codul pentru a utiliza " +"trăsături, pe care le puteți apoi mock-ui rapid:" -#: src/android/aidl/client.md -msgid "\"{msg}\"" +#: src/android/testing/mocking.md:27 +#, fuzzy +msgid "" +"Mockall is the recommended mocking library in Android (AOSP). There are " +"other [mocking libraries available on crates.io](https://crates.io/keywords/" +"mock), in particular in the area of mocking HTTP services. The other mocking " +"libraries work in a similar fashion as Mockall, meaning that they make it " +"easy to get a mock implementation of a given trait." msgstr "" +"Sfatul de aici este pentru Android (AOSP), unde Mockall este biblioteca de " +"mocking recomandată. Există și alte [biblioteci de mocking disponibile pe " +"crates.io](https://crates.io/keywords/mock), în special în domeniul mocking-" +"ului serviciilor HTTP. Celelalte biblioteci de mocking funcționează într-un " +"mod similar cu Mockall, ceea ce înseamnă că acestea facilitează obținerea " +"unei implementări simulate a unei anumite trăsături." -#: src/android/aidl/client.md +#: src/android/testing/mocking.md:33 #, fuzzy -msgid "\"birthday_client\"" -msgstr "_birthday_service/src/client.rs_:" +msgid "" +"Note that mocking is somewhat _controversial_: mocks allow you to completely " +"isolate a test from its dependencies. The immediate result is faster and " +"more stable test execution. On the other hand, the mocks can be configured " +"wrongly and return output different from what the real dependencies would do." +msgstr "" +"Rețineți că mocking-ul este oarecum _controversat_: mocks vă permite să " +"izolați complet un test de dependențele sale. Rezultatul imediat este o " +"execuție mai rapidă și mai stabilă a testelor. Pe de altă parte, mock-urile " +"pot fi configurate greșit și pot returna rezultate diferite de cele pe care " +"le-ar face dependențele reale." -#: src/android/aidl/client.md +#: src/android/testing/mocking.md:38 #, fuzzy -msgid "\"src/client.rs\"" -msgstr "src/bin/client.rs_:" +msgid "" +"If at all possible, it is recommended that you use the real dependencies. As " +"an example, many databases allow you to configure an in-memory backend. This " +"means that you get the correct behavior in your tests, plus they are fast " +"and will automatically clean up after themselves." +msgstr "" +"Dacă este posibil, se recomandă să folosiți dependențele reale. Ca exemplu, " +"multe baze de date vă permit să configurați un backend în memorie. Acest " +"lucru înseamnă că obțineți comportamentul corect în testele dvs., în plus, " +"sunt rapide și se vor curăța automat după ele însele." -#: src/android/aidl/client.md +#: src/android/testing/mocking.md:43 #, fuzzy -msgid "Notice that the client does not depend on `libbirthdayservice`." -msgstr "Observați că clientul nu depinde de `libbirthdayservice`." +msgid "" +"Similarly, many web frameworks allow you to start an in-process server which " +"binds to a random port on `localhost`. Always prefer this over mocking away " +"the framework since it helps you test your code in the real environment." +msgstr "" +"În mod similar, multe cadre web vă permit să porniți un server în proces " +"care se leagă la un port aleatoriu pe `localhost`. Preferați întotdeauna " +"acest lucru în locul mocking-ului în afara cadrului, deoarece vă ajută să vă " +"testați codul în mediul real." -#: src/android/aidl/client.md +#: src/android/testing/mocking.md:47 #, fuzzy -msgid "Build, push, and run the client on your device:" -msgstr "Creați, distribuiți și rulați clientul pe dispozitivul dvs:" +msgid "" +"Mockall is not part of the Rust Playground, so you need to run this example " +"in a local environment. Use `cargo add mockall` to quickly add Mockall to an " +"existing Cargo project." +msgstr "" +"Mockall nu face parte din Rust Playground, așa că trebuie să executați acest " +"exemplu într-un mediu local. Utilizați `cargo add mockall` pentru a adăuga " +"rapid Mockall la un proiect Cargo existent." -#: src/android/aidl/client.md +#: src/android/testing/mocking.md:51 #, fuzzy msgid "" -"```shell\n" -"m birthday_client\n" -"adb push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_client\" /data/local/" -"tmp\n" -"adb shell /data/local/tmp/birthday_client Charlie 60\n" -"```" +"Mockall has a lot more functionality. In particular, you can set up " +"expectations which depend on the arguments passed. Here we use this to mock " +"a cat which becomes hungry 3 hours after the last time it was fed:" msgstr "" -"```shell\n" -"m birthday_client\n" -"adb push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_client /data/local/" -"tmp\"\n" -"adb shell /data/local/tmp/birthday_client Charlie 60\n" -"```" +"Mockall are mult mai multe funcționalități. În special, puteți configura " +"așteptări care depind de argumentele transmise. Aici folosim acest lucru " +"pentru a imita o pisică care devine flămândă la 3 ore după ce a fost hrănită " +"ultima dată:" -#: src/android/aidl/changing.md +#: src/android/testing/mocking.md:69 #, fuzzy msgid "" -"Let us extend the API with more functionality: we want to let clients " -"specify a list of lines for the birthday card:" +"You can use `.times(n)` to limit the number of times a mock method can be " +"called to `n` --- the mock will automatically panic when dropped if this " +"isn't satisfied." msgstr "" -"Să extindem API-ul cu mai multe funcționalități: dorim să permitem " -"clienților să specifice o listă de linii pentru felicitarea de ziua de " -"naștere:" +"Puteți utiliza `.times(n)` pentru a limita numărul de apeluri ale unei " +"metode mock la `n` --- mock-ul va intra automat în panică atunci când va fi " +"abandonat dacă acest lucru nu este îndeplinit." -#: src/android/logging.md +#: src/android/logging.md:3 #, fuzzy msgid "" "You should use the `log` crate to automatically log to `logcat` (on-device) " @@ -13412,61 +15559,71 @@ msgstr "" "Ar trebui să folosiți caseta `log` pentru a înregistra automat în `logcat` " "(pe dispozitiv) sau `stdout` (pe gazdă):" -#: src/android/logging.md +#: src/android/logging.md:6 #, fuzzy msgid "_hello_rust_logs/Android.bp_:" msgstr "salut_rust_logs/Android.bp_:" -#: src/android/logging.md +#: src/android/logging.md:10 src/android/logging.md:11 #, fuzzy msgid "\"hello_rust_logs\"" msgstr "salut_rust_logs/Android.bp_:" -#: src/android/logging.md +#: src/android/logging.md:14 +#, fuzzy msgid "\"liblog_rust\"" -msgstr "" +msgstr "\"liblog_rust\"" -#: src/android/logging.md +#: src/android/logging.md:15 +#, fuzzy msgid "\"liblogger\"" -msgstr "" +msgstr "\"liblogger\"" -#: src/android/logging.md +#: src/android/logging.md:21 #, fuzzy msgid "_hello_rust_logs/src/main.rs_:" msgstr "hello_rust_logs/src/main.rs_:" -#: src/android/logging.md +#: src/android/logging.md:24 +#, fuzzy msgid "//! Rust logging demo.\n" -msgstr "" +msgstr "//! Demonstrație de logare Rust.\n" -#: src/android/logging.md +#: src/android/logging.md:27 +#, fuzzy msgid "/// Logs a greeting.\n" -msgstr "" +msgstr "/// Înregistrează o salutare.\n" -#: src/android/logging.md +#: src/android/logging.md:32 +#, fuzzy msgid "\"rust\"" msgstr "" +"Rust în Android:\n" +"A se vedea [Rust in Android](android.md)." -#: src/android/logging.md +#: src/android/logging.md:35 +#, fuzzy msgid "\"Starting program.\"" -msgstr "" +msgstr "\"Program de pornire.\"" -#: src/android/logging.md +#: src/android/logging.md:36 +#, fuzzy msgid "\"Things are going fine.\"" -msgstr "" +msgstr "\"Lucrurile merg bine.\"" -#: src/android/logging.md +#: src/android/logging.md:37 +#, fuzzy msgid "\"Something went wrong!\"" -msgstr "" +msgstr "\"Ceva a mers prost!\"" -#: src/android/logging.md src/android/interoperability/with-c/bindgen.md -#: src/android/interoperability/with-c/rust.md +#: src/android/logging.md:41 src/android/interoperability/with-c/bindgen.md:96 +#: src/android/interoperability/with-c/rust.md:72 #, fuzzy msgid "Build, push, and run the binary on your device:" msgstr "" "Creați, distribuiți și rulați programul binar pe dispozitivul dumneavoastră:" -#: src/android/logging.md +#: src/android/logging.md:43 #, fuzzy msgid "" "```shell\n" @@ -13483,12 +15640,12 @@ msgstr "" "adb shell /data/local/tmp/hello_rust_logs\n" "```" -#: src/android/logging.md +#: src/android/logging.md:49 #, fuzzy msgid "The logs show up in `adb logcat`:" msgstr "Jurnalele apar în `adb logcat`:" -#: src/android/interoperability.md +#: src/android/interoperability.md:3 #, fuzzy msgid "" "Rust has excellent support for interoperability with other languages. This " @@ -13497,17 +15654,17 @@ msgstr "" "Rust are un suport excelent pentru interoperabilitatea cu alte limbaje. " "Acest lucru înseamnă că puteți:" -#: src/android/interoperability.md +#: src/android/interoperability.md:6 #, fuzzy msgid "Call Rust functions from other languages." msgstr "Apelarea funcțiilor Rust din alte limbaje." -#: src/android/interoperability.md +#: src/android/interoperability.md:7 #, fuzzy msgid "Call functions written in other languages from Rust." msgstr "Apelarea funcțiilor scrise în alte limbaje din Rust." -#: src/android/interoperability.md +#: src/android/interoperability.md:9 #, fuzzy msgid "" "When you call functions in a foreign language we say that you're using a " @@ -13516,12 +15673,12 @@ msgstr "" "Atunci când apelați funcții într-o limbă străină, spunem că utilizați o " "_interfață de funcții străine_, cunoscută și sub numele de FFI." -#: src/android/interoperability/with-c.md +#: src/android/interoperability/with-c.md:1 #, fuzzy msgid "Interoperability with C" -msgstr "Interoperabilitate cu C" +msgstr "Interoperabilitatea cu C++" -#: src/android/interoperability/with-c.md +#: src/android/interoperability/with-c.md:3 #, fuzzy msgid "" "Rust has full support for linking object files with a C calling convention. " @@ -13531,16 +15688,17 @@ msgstr "" "convenție de apelare C. În mod similar, puteți exporta funcții Rust și le " "puteți apela din C." -#: src/android/interoperability/with-c.md +#: src/android/interoperability/with-c.md:6 #, fuzzy msgid "You can do it by hand if you want:" msgstr "Puteți să o faceți manual, dacă doriți:" -#: src/android/interoperability/with-c.md +#: src/android/interoperability/with-c.md:16 +#, fuzzy msgid "\"{x}, {abs_x}\"" -msgstr "" +msgstr "\"{x}, {abs_x}\"" -#: src/android/interoperability/with-c.md +#: src/android/interoperability/with-c.md:20 #, fuzzy msgid "" "We already saw this in the [Safe FFI Wrapper exercise](../../exercises/day-3/" @@ -13549,7 +15707,7 @@ msgstr "" "Am văzut deja acest lucru în [Exercițiul [Safe FFI Wrapper] (../../exerciții/" "zi-3/safe-ffi-wrapper.md)." -#: src/android/interoperability/with-c.md +#: src/android/interoperability/with-c.md:23 #, fuzzy msgid "" "This assumes full knowledge of the target platform. Not recommended for " @@ -13558,17 +15716,17 @@ msgstr "" "Acest lucru presupune cunoașterea completă a platformei țintă. Nu se " "recomandă pentru producție." -#: src/android/interoperability/with-c.md +#: src/android/interoperability/with-c.md:26 #, fuzzy msgid "We will look at better options next." msgstr "În continuare, vom examina opțiuni mai bune." -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:1 #, fuzzy msgid "Using Bindgen" msgstr "Utilizarea Bindgen" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:3 #, fuzzy msgid "" "The [bindgen](https://rust-lang.github.io/rust-bindgen/introduction.html) " @@ -13577,26 +15735,28 @@ msgstr "" "Instrumentul [bindgen](https://rust-lang.github.io/rust-bindgen/introduction." "html) poate genera automat legăturile dintr-un fișier de antet C." -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:6 #, fuzzy msgid "First create a small C library:" msgstr "Mai întâi creați o mică bibliotecă C:" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:8 #, fuzzy msgid "_interoperability/bindgen/libbirthday.h_:" msgstr "interoperabilitate/bindgen/libbirthday.h_:" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:19 #, fuzzy msgid "_interoperability/bindgen/libbirthday.c_:" msgstr "interoperabilitate/bindgen/libbirthday.c_:" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:22 +#, fuzzy msgid "" -msgstr "" +msgstr "" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:23 +#: src/android/interoperability/with-c/bindgen.md:50 #, fuzzy msgid "\"libbirthday.h\"" msgstr "" @@ -13604,37 +15764,47 @@ msgstr "" "#include \"libbirthday.h\"\n" "```" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:26 +#: src/android/interoperability/with-c/bindgen.md:29 +#, fuzzy msgid "\"+--------------\\n\"" -msgstr "" +msgstr "\"fib(n) = {}\"" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:27 +#, fuzzy msgid "\"| Happy Birthday %s!\\n\"" -msgstr "" +msgstr "\"| La mulți ani %s!\\n\"" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:28 +#, fuzzy msgid "\"| Congratulations with the %i years!\\n\"" -msgstr "" +msgstr "\"| Felicitări cu %i ani!\\n\"" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:33 #, fuzzy msgid "Add this to your `Android.bp` file:" msgstr "Adăugați acest lucru la fișierul `Android.bp`:" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:35 +#: src/android/interoperability/with-c/bindgen.md:55 +#: src/android/interoperability/with-c/bindgen.md:69 +#: src/android/interoperability/with-c/bindgen.md:106 #, fuzzy msgid "_interoperability/bindgen/Android.bp_:" msgstr "interoperabilitate/bindgen/Android.bp_:" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:39 +#: src/android/interoperability/with-c/bindgen.md:63 +#, fuzzy msgid "\"libbirthday\"" -msgstr "" +msgstr "\"libbirthday\"" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:40 +#, fuzzy msgid "\"libbirthday.c\"" -msgstr "" +msgstr "\"libbirthday.c\"" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:44 #, fuzzy msgid "" "Create a wrapper header file for the library (not strictly needed in this " @@ -13643,61 +15813,70 @@ msgstr "" "Creați un fișier de antet de înfășurare pentru bibliotecă (nu este strict " "necesar în acest exemplu):" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:47 #, fuzzy msgid "_interoperability/bindgen/libbirthday_wrapper.h_:" msgstr "interoperabilitate/bindgen/libbirthday_wrapper.h_:" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:53 #, fuzzy msgid "You can now auto-generate the bindings:" msgstr "Acum puteți să generați automat legăturile:" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:59 +#: src/android/interoperability/with-c/bindgen.md:75 +#, fuzzy msgid "\"libbirthday_bindgen\"" -msgstr "" +msgstr "\"libbirthday_bindgen\"" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:60 #, fuzzy msgid "\"birthday_bindgen\"" msgstr "`rust_bindgen`" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:61 +#, fuzzy msgid "\"libbirthday_wrapper.h\"" -msgstr "" +msgstr "\"libbirthday_wrapper.h\"" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:62 +#, fuzzy msgid "\"bindings\"" -msgstr "" +msgstr "Exemple de legături" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:67 #, fuzzy msgid "Finally, we can use the bindings in our Rust program:" msgstr "În cele din urmă, putem utiliza legăturile în programul nostru Rust:" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:73 +#, fuzzy msgid "\"print_birthday_card\"" -msgstr "" +msgstr "\"print_birthday_card\"" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:74 #, fuzzy msgid "\"main.rs\"" msgstr "_main.rs_:" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:79 #, fuzzy msgid "_interoperability/bindgen/main.rs_:" msgstr "interoperabilitate/bindgen/main.rs_:" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:82 +#, fuzzy msgid "//! Bindgen demo.\n" -msgstr "" +msgstr "//! Bindgen demo.\n" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:89 +#, fuzzy msgid "// SAFETY: `print_card` is safe to call with a valid `card` pointer.\n" msgstr "" +"// SIGURANȚĂ: `print_card` poate fi apelat în siguranță cu un pointer `card` " +"valid.\n" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:98 #, fuzzy msgid "" "```shell\n" @@ -13714,115 +15893,139 @@ msgstr "" "adb shell /data/local/tmp/print_birthday_card\n" "```" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:104 #, fuzzy msgid "Finally, we can run auto-generated tests to ensure the bindings work:" msgstr "" "În cele din urmă, putem rula teste generate automat pentru a ne asigura că " "legăturile funcționează:" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:110 +#: src/android/interoperability/with-c/bindgen.md:112 +#, fuzzy msgid "\"libbirthday_bindgen_test\"" -msgstr "" +msgstr "\"libbirthday_bindgen_test\"" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:111 +#, fuzzy msgid "\":libbirthday_bindgen\"" -msgstr "" +msgstr "\":libbirthday_bindgen\"" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:115 +#: src/android/interoperability/with-c/bindgen.md:116 #, fuzzy -msgid "\"general-tests\"" -msgstr "Rust nesigur" - -#: src/android/interoperability/with-c/bindgen.md msgid "\"none\"" msgstr "" +"```rust,editabile\n" +"fn main() {\n" +" match std::env::args().next().as_deref() {\n" +" Some(\"cat\") => println!(\"Va face lucruri de pisică\"),\n" +" Some(\"ls\") => println!(\"Va face ls unor fișiere\"),\n" +" Some(\"mv\") => println!(\"Va muta niște fișiere\"),\n" +" Some(\"rm\") => println!(\"Uh, periculos!\"),\n" +" None => println!(\"Hmm, niciun nume de program?\"),\n" +" _ => println!(\"Nume de program necunoscut!\"),\n" +" }\n" +"}\n" +"```" -#: src/android/interoperability/with-c/bindgen.md +#: src/android/interoperability/with-c/bindgen.md:115 +#, fuzzy msgid "// Generated file, skip linting\n" -msgstr "" +msgstr "// Fișier generat, săriți linting\n" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:1 #, fuzzy msgid "Calling Rust" -msgstr "Apelarea Rust" +msgstr "Apelarea Rust din C" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:3 #, fuzzy msgid "Exporting Rust functions and types to C is easy:" msgstr "Exportul funcțiilor și tipurilor Rust în C este ușor:" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:5 #, fuzzy msgid "_interoperability/rust/libanalyze/analyze.rs_" msgstr "interoperabilitate/interoperabilitate/rust/libanalyze/analyze.rs_" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:8 +#, fuzzy msgid "//! Rust FFI demo.\n" -msgstr "" +msgstr "//! Demonstrație Rust FFI.\n" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:12 +#, fuzzy msgid "/// Analyze the numbers.\n" -msgstr "" +msgstr "/// Analizați numerele.\n" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:17 +#, fuzzy msgid "\"x ({x}) is smallest!\"" -msgstr "" +msgstr "\"x ({x}) este cel mai mic!\"" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:19 +#, fuzzy msgid "\"y ({y}) is probably larger than x ({x})\"" -msgstr "" +msgstr "\"y ({y}) este probabil mai mare decât x ({x})\"" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:24 #, fuzzy msgid "_interoperability/rust/libanalyze/analyze.h_" msgstr "interoperabilitate/interoperabilitate/rust/libanalyze/analyze.h_" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:37 #, fuzzy msgid "_interoperability/rust/libanalyze/Android.bp_" msgstr "interoperabilitate/interoperabilitate/rusine/libanaliza/Android.bp_" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:41 +#: src/android/interoperability/with-c/rust.md:68 +#, fuzzy msgid "\"libanalyze_ffi\"" -msgstr "" +msgstr "\"libanalyze_ffi\"" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:42 +#, fuzzy msgid "\"analyze_ffi\"" -msgstr "" +msgstr "\"analyze_ffi\"" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:43 +#, fuzzy msgid "\"analyze.rs\"" -msgstr "" +msgstr "\"analyze.rs\"" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:48 #, fuzzy msgid "We can now call this from a C binary:" msgstr "Acum putem apela acest lucru dintr-un binar C:" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:50 #, fuzzy msgid "_interoperability/rust/analyze/main.c_" msgstr "interoperabilitate/rust/analiza/main.c_" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:53 +#, fuzzy msgid "\"analyze.h\"" -msgstr "" +msgstr "\"analyze.h\"" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:62 #, fuzzy msgid "_interoperability/rust/analyze/Android.bp_" msgstr "interoperabilitate/încălzire/antreprenoriat/analiza/Android.bp_" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:66 +#, fuzzy msgid "\"analyze_numbers\"" -msgstr "" +msgstr "\"analyze_numbers\"" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:67 +#, fuzzy msgid "\"main.c\"" -msgstr "" +msgstr "\"main.c\"" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:74 #, fuzzy msgid "" "```shell\n" @@ -13839,7 +16042,7 @@ msgstr "" "adb shell /data/local/tmp/analyze_numbers\n" "```" -#: src/android/interoperability/with-c/rust.md +#: src/android/interoperability/with-c/rust.md:82 #, fuzzy msgid "" "`#[no_mangle]` disables Rust's usual name mangling, so the exported symbol " @@ -13851,7 +16054,7 @@ msgstr "" "utiliza `#[export_name = \"some_name\"]` pentru a specifica orice nume " "doriți." -#: src/android/interoperability/cpp.md +#: src/android/interoperability/cpp.md:3 #, fuzzy msgid "" "The [CXX crate](https://cxx.rs/) makes it possible to do safe " @@ -13860,382 +16063,491 @@ msgstr "" "[CXX crate](https://cxx.rs/) face posibilă realizarea unei " "interoperabilități sigure între Rust și C++." -#: src/android/interoperability/cpp.md +#: src/android/interoperability/cpp.md:6 #, fuzzy msgid "The overall approach looks like this:" msgstr "Abordarea generală arată în felul următor:" -#: src/android/interoperability/cpp/bridge.md +#: src/android/interoperability/cpp/bridge.md:3 +#, fuzzy msgid "" "CXX relies on a description of the function signatures that will be exposed " "from each language to the other. You provide this description using extern " "blocks in a Rust module annotated with the `#[cxx::bridge]` attribute macro." msgstr "" +"CXX se bazează pe o descriere a semnăturilor funcțiilor care vor fi expuse " +"de la un limbaj la celălalt. Această descriere este furnizată cu ajutorul " +"blocurilor externe dintr-un modul Rust adnotat cu macroul atribut `#[cxx::" +"bridge]`." -#: src/android/interoperability/cpp/bridge.md +#: src/android/interoperability/cpp/bridge.md:9 +#, fuzzy msgid "\"org::blobstore\"" -msgstr "" +msgstr "\"org::blobstore\"" -#: src/android/interoperability/cpp/bridge.md +#: src/android/interoperability/cpp/bridge.md:11 +#, fuzzy msgid "// Shared structs with fields visible to both languages.\n" -msgstr "" +msgstr "// Structuri partajate cu câmpuri vizibile pentru ambele limbi.\n" -#: src/android/interoperability/cpp/bridge.md -#: src/android/interoperability/cpp/generated-cpp.md +#: src/android/interoperability/cpp/bridge.md:17 +#: src/android/interoperability/cpp/generated-cpp.md:6 +#, fuzzy msgid "// Rust types and signatures exposed to C++.\n" -msgstr "" +msgstr "// Tipuri și semnături Rust expuse în C++.\n" -#: src/android/interoperability/cpp/bridge.md -#: src/android/interoperability/cpp/rust-bridge.md -#: src/android/interoperability/cpp/generated-cpp.md -#: src/android/interoperability/cpp/rust-result.md -#: src/chromium/interoperability-with-cpp/example-bindings.md -#: src/chromium/interoperability-with-cpp/error-handling-qr.md -#: src/chromium/interoperability-with-cpp/error-handling-png.md +#: src/android/interoperability/cpp/bridge.md:18 +#: src/android/interoperability/cpp/rust-bridge.md:6 +#: src/android/interoperability/cpp/generated-cpp.md:7 +#: src/android/interoperability/cpp/rust-result.md:6 +#: src/chromium/interoperability-with-cpp/example-bindings.md:9 +#: src/chromium/interoperability-with-cpp/error-handling-qr.md:10 +#: src/chromium/interoperability-with-cpp/error-handling-png.md:9 #, fuzzy msgid "\"Rust\"" -msgstr "Bine ați venit la Comprehensive Rust 🦀 (ghidul complet pentu Rust)" +msgstr "" +"Rust în Android:\n" +"A se vedea [Rust in Android](android.md)." -#: src/android/interoperability/cpp/bridge.md -#: src/android/interoperability/cpp/cpp-bridge.md +#: src/android/interoperability/cpp/bridge.md:24 +#: src/android/interoperability/cpp/cpp-bridge.md:6 +#, fuzzy msgid "// C++ types and signatures exposed to Rust.\n" -msgstr "" +msgstr "// Tipuri și semnături C++ expuse în Rust.\n" -#: src/android/interoperability/cpp/bridge.md -#: src/android/interoperability/cpp/cpp-bridge.md -#: src/android/interoperability/cpp/cpp-exception.md -#: src/chromium/interoperability-with-cpp/example-bindings.md +#: src/android/interoperability/cpp/bridge.md:25 +#: src/android/interoperability/cpp/cpp-bridge.md:7 +#: src/android/interoperability/cpp/cpp-exception.md:6 +#: src/chromium/interoperability-with-cpp/example-bindings.md:15 +#, fuzzy msgid "\"C++\"" -msgstr "" +msgstr "Cu C" -#: src/android/interoperability/cpp/bridge.md -#: src/android/interoperability/cpp/cpp-bridge.md +#: src/android/interoperability/cpp/bridge.md:26 +#: src/android/interoperability/cpp/cpp-bridge.md:8 +#, fuzzy msgid "\"include/blobstore.h\"" -msgstr "" +msgstr "\"include/blobstore.h\"" -#: src/android/interoperability/cpp/bridge.md +#: src/android/interoperability/cpp/bridge.md:40 +#, fuzzy msgid "The bridge is generally declared in an `ffi` module within your crate." msgstr "" +"Puntea este, în general, declarată într-un modul `ffi` din cadrul seriei " +"dumneavoastră." -#: src/android/interoperability/cpp/bridge.md +#: src/android/interoperability/cpp/bridge.md:41 +#, fuzzy msgid "" "From the declarations made in the bridge module, CXX will generate matching " "Rust and C++ type/function definitions in order to expose those items to " "both languages." msgstr "" +"Din declarațiile făcute în modulul punte, CXX va genera definiții de tip/" +"funcție Rust și C++ corespunzătoare pentru a expune aceste elemente în " +"ambele limbaje." -#: src/android/interoperability/cpp/bridge.md +#: src/android/interoperability/cpp/bridge.md:44 +#, fuzzy msgid "" "To view the generated Rust code, use [cargo-expand](https://github.com/" "dtolnay/cargo-expand) to view the expanded proc macro. For most of the " "examples you would use `cargo expand ::ffi` to expand just the `ffi` module " "(though this doesn't apply for Android projects)." msgstr "" +"Pentru a vizualiza codul Rust generat, utilizați [cargo-expand](https://" +"github.com/dtolnay/cargo-expand) pentru a vizualiza macroul proc extins. " +"Pentru majoritatea exemplelor, veți folosi `cargo expand ::ffi` pentru a " +"extinde doar modulul `ffi` (deși acest lucru nu se aplică pentru proiectele " +"Android)." -#: src/android/interoperability/cpp/bridge.md +#: src/android/interoperability/cpp/bridge.md:47 +#, fuzzy msgid "To view the generated C++ code, look in `target/cxxbridge`." -msgstr "" +msgstr "Pentru a vizualiza codul C++ generat, căutați în `target/cxxbridge`." -#: src/android/interoperability/cpp/rust-bridge.md +#: src/android/interoperability/cpp/rust-bridge.md:1 +#, fuzzy msgid "Rust Bridge Declarations" -msgstr "" +msgstr "Declarații Rust Bridge" -#: src/android/interoperability/cpp/rust-bridge.md +#: src/android/interoperability/cpp/rust-bridge.md:7 +#, fuzzy msgid "// Opaque type\n" -msgstr "" +msgstr "// Tip opac\n" -#: src/android/interoperability/cpp/rust-bridge.md +#: src/android/interoperability/cpp/rust-bridge.md:8 +#, fuzzy msgid "// Method on `MyType`\n" -msgstr "" +msgstr "// Metoda pe `MyType`\n" -#: src/android/interoperability/cpp/rust-bridge.md +#: src/android/interoperability/cpp/rust-bridge.md:9 #, fuzzy msgid "// Free function\n" msgstr "funcție:" -#: src/android/interoperability/cpp/rust-bridge.md +#: src/android/interoperability/cpp/rust-bridge.md:28 +#, fuzzy msgid "" "Items declared in the `extern \"Rust\"` reference items that are in scope in " "the parent module." msgstr "" +"Elementele declarate în modulul `extern \"Rust\"` fac trimitere la elemente " +"care se află în domeniul de aplicare în modulul părinte." -#: src/android/interoperability/cpp/rust-bridge.md +#: src/android/interoperability/cpp/rust-bridge.md:30 +#, fuzzy msgid "" "The CXX code generator uses your `extern \"Rust\"` section(s) to produce a C+" "+ header file containing the corresponding C++ declarations. The generated " "header has the same path as the Rust source file containing the bridge, " "except with a .rs.h file extension." msgstr "" +"Generatorul de cod CXX utilizează secțiunea (secțiunile) `extern \"Rust\"` " +"pentru a produce un fișier antet C++ care conține declarațiile C++ " +"corespunzătoare. Antetul generat are aceeași cale ca și fișierul sursă Rust " +"care conține puntea, dar cu extensia de fișier .rs.h." -#: src/android/interoperability/cpp/generated-cpp.md +#: src/android/interoperability/cpp/generated-cpp.md:15 +#, fuzzy msgid "Results in (roughly) the following C++:" -msgstr "" +msgstr "Rezultă (aproximativ) următorul C++:" -#: src/android/interoperability/cpp/cpp-bridge.md +#: src/android/interoperability/cpp/cpp-bridge.md:1 +#, fuzzy msgid "C++ Bridge Declarations" -msgstr "" +msgstr "Declarații de punte C++" -#: src/android/interoperability/cpp/cpp-bridge.md +#: src/android/interoperability/cpp/cpp-bridge.md:20 +#, fuzzy msgid "Results in (roughly) the following Rust:" -msgstr "" +msgstr "Rezultă (aproximativ) următorul Rust:" -#: src/android/interoperability/cpp/cpp-bridge.md +#: src/android/interoperability/cpp/cpp-bridge.md:30 +#, fuzzy msgid "\"org$blobstore$cxxbridge1$new_blobstore_client\"" -msgstr "" +msgstr "\"org$blobstore$cxxbridge1$new_blobstore_client\"" -#: src/android/interoperability/cpp/cpp-bridge.md +#: src/android/interoperability/cpp/cpp-bridge.md:39 +#, fuzzy msgid "\"org$blobstore$cxxbridge1$BlobstoreClient$put\"" -msgstr "" +msgstr "\"org$blobstore$cxxbridge1$BlobstoreClient$put\"" -#: src/android/interoperability/cpp/cpp-bridge.md +#: src/android/interoperability/cpp/cpp-bridge.md:56 +#, fuzzy msgid "" "The programmer does not need to promise that the signatures they have typed " "in are accurate. CXX performs static assertions that the signatures exactly " "correspond with what is declared in C++." msgstr "" +"Programatorul nu trebuie să promită că semnăturile pe care le-a introdus " +"sunt corecte. CXX efectuează verificări statice pentru a se asigura că " +"semnăturile corespund exact cu ceea ce este declarat în C++." -#: src/android/interoperability/cpp/cpp-bridge.md +#: src/android/interoperability/cpp/cpp-bridge.md:59 +#, fuzzy msgid "" "`unsafe extern` blocks allow you to declare C++ functions that are safe to " "call from Rust." msgstr "" +"blocurile `unsafe extern` vă permit să declarați funcții C++ care pot fi " +"apelate în siguranță din Rust." -#: src/android/interoperability/cpp/shared-types.md +#: src/android/interoperability/cpp/shared-types.md:9 +#, fuzzy msgid "// A=1, J=11, Q=12, K=13\n" -msgstr "" +msgstr "// A=1, J=11, Q=12, K=13\n" -#: src/android/interoperability/cpp/shared-types.md +#: src/android/interoperability/cpp/shared-types.md:23 +#, fuzzy msgid "Only C-like (unit) enums are supported." -msgstr "" +msgstr "Sunt acceptate numai enumerațiile de tip C (unitate)." -#: src/android/interoperability/cpp/shared-types.md +#: src/android/interoperability/cpp/shared-types.md:24 +#, fuzzy msgid "" "A limited number of traits are supported for `#[derive()]` on shared types. " "Corresponding functionality is also generated for the C++ code, e.g. if you " "derive `Hash` also generates an implementation of `std::hash` for the " "corresponding C++ type." msgstr "" +"Un număr limitat de trăsături sunt acceptate pentru `#[derive()]` pe tipuri " +"partajate. Funcționalitatea corespunzătoare este, de asemenea, generată " +"pentru codul C++, de exemplu, dacă derivați `Hash`, se generează și o " +"implementare a `std::hash` pentru tipul C++ corespunzător." -#: src/android/interoperability/cpp/shared-enums.md -#, fuzzy +#: src/android/interoperability/cpp/shared-enums.md:15 msgid "Generated Rust:" -msgstr "Rust nesigur" +msgstr "Cod Rust generat:" -#: src/android/interoperability/cpp/shared-enums.md +#: src/android/interoperability/cpp/shared-enums.md:33 msgid "Generated C++:" -msgstr "" +msgstr "Cod C++ generat:" -#: src/android/interoperability/cpp/shared-enums.md +#: src/android/interoperability/cpp/shared-enums.md:46 +#, fuzzy msgid "" "On the Rust side, the code generated for shared enums is actually a struct " "wrapping a numeric value. This is because it is not UB in C++ for an enum " "class to hold a value different from all of the listed variants, and our " "Rust representation needs to have the same behavior." msgstr "" +"În ceea ce privește Rust, codul generat pentru enumerațiile partajate este " +"de fapt o structură care înfășoară o valoare numerică. Acest lucru se " +"datorează faptului că nu este UB în C++ ca o clasă enum să dețină o valoare " +"diferită de toate variantele enumerate, iar reprezentarea noastră Rust " +"trebuie să aibă același comportament." -#: src/android/interoperability/cpp/rust-result.md +#: src/android/interoperability/cpp/rust-result.md:13 +#, fuzzy msgid "\"fallible1 requires depth > 0\"" -msgstr "" +msgstr "\"fallible1 necesită adâncime > 0\"" -#: src/android/interoperability/cpp/rust-result.md +#: src/android/interoperability/cpp/rust-result.md:16 +#, fuzzy msgid "\"Success!\"" -msgstr "" +msgstr "\"Succes!\"" -#: src/android/interoperability/cpp/rust-result.md +#: src/android/interoperability/cpp/rust-result.md:22 +#, fuzzy msgid "" "Rust functions that return `Result` are translated to exceptions on the C++ " "side." msgstr "" +"Funcțiile Rust care returnează `Result` sunt transformate în excepții în " +"limbajul C++." -#: src/android/interoperability/cpp/rust-result.md +#: src/android/interoperability/cpp/rust-result.md:24 +#, fuzzy msgid "" "The exception thrown will always be of type `rust::Error`, which primarily " "exposes a way to get the error message string. The error message will come " "from the error type's `Display` impl." msgstr "" +"Excepția aruncată va fi întotdeauna de tipul `rust::Error`, care expune în " +"primul rând o modalitate de a obține șirul de mesaje de eroare. Mesajul de " +"eroare va proveni din implantul `Display` al tipului de eroare." -#: src/android/interoperability/cpp/rust-result.md +#: src/android/interoperability/cpp/rust-result.md:27 +#, fuzzy msgid "" "A panic unwinding from Rust to C++ will always cause the process to " "immediately terminate." msgstr "" +"O dezarhivare de panică din Rust în C++ va determina întotdeauna terminarea " +"imediată a procesului." -#: src/android/interoperability/cpp/cpp-exception.md +#: src/android/interoperability/cpp/cpp-exception.md:7 +#, fuzzy msgid "\"example/include/example.h\"" -msgstr "" +msgstr "\"example/include/example.h\"" -#: src/android/interoperability/cpp/cpp-exception.md +#: src/android/interoperability/cpp/cpp-exception.md:14 +#, fuzzy msgid "\"Error: {}\"" -msgstr "" +msgstr "Trăsături ‘Error’" -#: src/android/interoperability/cpp/cpp-exception.md +#: src/android/interoperability/cpp/cpp-exception.md:22 +#, fuzzy msgid "" "C++ functions declared to return a `Result` will catch any thrown exception " "on the C++ side and return it as an `Err` value to the calling Rust function." msgstr "" +"Funcțiile C++ declarate pentru a returna un `Result` vor prinde orice " +"excepție lansată în partea C++ și o vor returna ca valoare `Err` funcției " +"Rust care o apelează." -#: src/android/interoperability/cpp/cpp-exception.md +#: src/android/interoperability/cpp/cpp-exception.md:24 +#, fuzzy msgid "" "If an exception is thrown from an extern \"C++\" function that is not " "declared by the CXX bridge to return `Result`, the program calls C++'s `std::" "terminate`. The behavior is equivalent to the same exception being thrown " "through a `noexcept` C++ function." msgstr "" +"Dacă o excepție este aruncată de o funcție externă \"C++\" care nu este " +"declarată de puntea CXX pentru a returna `Result`, programul apelează `std::" +"terminate` din C++. Comportamentul este echivalent cu cel al unei excepții " +"aruncate printr-o funcție `noexcept` C++." -#: src/android/interoperability/cpp/type-mapping.md -#, fuzzy -msgid "Rust Type" -msgstr "Rugină prin exemplu" - -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:3 #, fuzzy msgid "C++ Type" msgstr "Exemplu C++" -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:5 #, fuzzy msgid "`rust::String`" msgstr "`rust_bindgen`" -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:6 msgid "`&str`" msgstr "`&str`" -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:6 #, fuzzy msgid "`rust::Str`" msgstr "`rust_test`" -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:7 #, fuzzy msgid "`CxxString`" msgstr "Sir" -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:7 #, fuzzy msgid "`std::string`" msgstr "șir:" -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:8 +#, fuzzy msgid "`&[T]`/`&mut [T]`" -msgstr "" +msgstr "`&[T]`/`&mut [T]`" -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:8 #, fuzzy msgid "`rust::Slice`" msgstr "`rust_ffi`" -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:9 +#, fuzzy msgid "`rust::Box`" -msgstr "" +msgstr "`rust::Box`" -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:10 +#, fuzzy msgid "`UniquePtr`" -msgstr "" - -#: src/android/interoperability/cpp/type-mapping.md -msgid "`std::unique_ptr`" -msgstr "" +msgstr "`UniquePtr`" -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:10 #, fuzzy -msgid "`Vec`" -msgstr "`Vec`" +msgid "`std::unique_ptr`" +msgstr "`std::unique_ptr`" -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:11 #, fuzzy msgid "`rust::Vec`" msgstr "`mpsc::Receiver`" -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:12 #, fuzzy msgid "`CxxVector`" msgstr "`Celula`" -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:12 #, fuzzy msgid "`std::vector`" msgstr "`mpsc::Receiver`" -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:16 +#, fuzzy msgid "" "These types can be used in the fields of shared structs and the arguments " "and returns of extern functions." msgstr "" +"Aceste tipuri pot fi utilizate în câmpurile structurilor partajate și în " +"argumentele și returnările funcțiilor externe." -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:18 +#, fuzzy msgid "" "Note that Rust's `String` does not map directly to `std::string`. There are " "a few reasons for this:" msgstr "" +"Rețineți că `String` din Rust nu se referă direct la `std::string`. Există " +"câteva motive pentru acest lucru:" -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:20 +#, fuzzy msgid "" "`std::string` does not uphold the UTF-8 invariant that `String` requires." -msgstr "" +msgstr "`std::string` nu respectă invarianta UTF-8 pe care `String` o cere." -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:21 +#, fuzzy msgid "" "The two types have different layouts in memory and so can't be passed " "directly between languages." msgstr "" +"Cele două tipuri au configurații diferite în memorie și, prin urmare, nu pot " +"fi transmise direct între limbi." -#: src/android/interoperability/cpp/type-mapping.md +#: src/android/interoperability/cpp/type-mapping.md:23 +#, fuzzy msgid "" "`std::string` requires move constructors that don't match Rust's move " "semantics, so a `std::string` can't be passed by value to Rust." msgstr "" +"`std::string` necesită constructori de mutare care nu se potrivesc cu " +"semantica de mutare a Rust, astfel încât un `std::string` nu poate fi " +"transmis ca valoare către Rust." -#: src/android/interoperability/cpp/android-build-cpp.md -#: src/android/interoperability/cpp/android-cpp-genrules.md -#: src/android/interoperability/cpp/android-build-rust.md +#: src/android/interoperability/cpp/android-build-cpp.md:1 +#: src/android/interoperability/cpp/android-cpp-genrules.md:1 +#: src/android/interoperability/cpp/android-build-rust.md:1 #, fuzzy msgid "Building in Android" -msgstr "Rust în Android" +msgstr "Construirea pentru Android: C++" -#: src/android/interoperability/cpp/android-build-cpp.md +#: src/android/interoperability/cpp/android-build-cpp.md:3 +#, fuzzy msgid "" "Create a `cc_library_static` to build the C++ library, including the CXX " "generated header and source file." msgstr "" +"Creați o `cc_library_static` pentru a construi biblioteca C++, inclusiv " +"fișierul sursă și antetul generat de CXX." -#: src/android/interoperability/cpp/android-build-cpp.md -#: src/android/interoperability/cpp/android-build-rust.md +#: src/android/interoperability/cpp/android-build-cpp.md:8 +#: src/android/interoperability/cpp/android-build-rust.md:10 +#, fuzzy msgid "\"libcxx_test_cpp\"" -msgstr "" +msgstr "\"libcxx_test_cpp\"" -#: src/android/interoperability/cpp/android-build-cpp.md +#: src/android/interoperability/cpp/android-build-cpp.md:9 +#, fuzzy msgid "\"cxx_test.cpp\"" -msgstr "" +msgstr "\"cxx_test.cpp\"" -#: src/android/interoperability/cpp/android-build-cpp.md +#: src/android/interoperability/cpp/android-build-cpp.md:11 +#, fuzzy msgid "\"cxx-bridge-header\"" -msgstr "" +msgstr "\"cxx-bridge-header\"" -#: src/android/interoperability/cpp/android-build-cpp.md -#: src/android/interoperability/cpp/android-cpp-genrules.md +#: src/android/interoperability/cpp/android-build-cpp.md:12 +#: src/android/interoperability/cpp/android-cpp-genrules.md:10 +#, fuzzy msgid "\"libcxx_test_bridge_header\"" -msgstr "" +msgstr "\"libcxx_test_bridge_header\"" -#: src/android/interoperability/cpp/android-build-cpp.md -#: src/android/interoperability/cpp/android-cpp-genrules.md +#: src/android/interoperability/cpp/android-build-cpp.md:14 +#: src/android/interoperability/cpp/android-cpp-genrules.md:19 +#, fuzzy msgid "\"libcxx_test_bridge_code\"" -msgstr "" +msgstr "\"libcxx_test_bridge_code\"" -#: src/android/interoperability/cpp/android-build-cpp.md +#: src/android/interoperability/cpp/android-build-cpp.md:20 +#, fuzzy 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 "" +"Indicați că `libcxx_test_bridge_header` și `libcxx_test_bridge_code` sunt " +"dependențele pentru legăturile C++ generate de CXX. Vom arăta cum sunt " +"configurate acestea în slide-ul următor." -#: src/android/interoperability/cpp/android-build-cpp.md +#: src/android/interoperability/cpp/android-build-cpp.md:23 +#, fuzzy msgid "" "Note that you also need to depend on the `cxx-bridge-header` library in " "order to pull in common CXX definitions." msgstr "" +"Rețineți că trebuie să depindeți și de biblioteca `cxx-bridge-header` pentru " +"a trage definițiile CXX comune." -#: src/android/interoperability/cpp/android-build-cpp.md +#: src/android/interoperability/cpp/android-build-cpp.md:25 +#, fuzzy 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/" @@ -14243,80 +16555,113 @@ msgid "" "that link with the class so that students know where they can find these " "instructions again in the future." msgstr "" +"Documentația completă pentru utilizarea CXX în Android poate fi găsită în " +"[the Android docs](https://source.android.com/docs/setup/build/rust/building-" +"rust-modules/android-rust-patterns#rust-cpp-interop-using-cxx). Este posibil " +"să doriți să împărtășiți acest link cu clasa, astfel încât elevii să știe " +"unde pot găsi din nou aceste instrucțiuni în viitor." -#: src/android/interoperability/cpp/android-cpp-genrules.md +#: src/android/interoperability/cpp/android-cpp-genrules.md:3 +#, fuzzy msgid "" "Create two genrules: One to generate the CXX header, and one to generate the " "CXX source file. These are then used as inputs to the `cc_library_static`." msgstr "" +"Creați două reguli de gen: Una pentru a genera antetul CXX și una pentru a " +"genera fișierul sursă CXX. Acestea sunt apoi folosite ca intrări în " +"`cc_library_static`." -#: src/android/interoperability/cpp/android-cpp-genrules.md +#: src/android/interoperability/cpp/android-cpp-genrules.md:7 +#, fuzzy msgid "" "// Generate a C++ header containing the C++ bindings\n" "// to the Rust exported functions in lib.rs.\n" msgstr "" +"// Generați un antet C++ care să conțină legăturile C++\n" +"// la funcțiile exportate Rust din lib.rs.\n" -#: src/android/interoperability/cpp/android-cpp-genrules.md +#: src/android/interoperability/cpp/android-cpp-genrules.md:11 +#: src/android/interoperability/cpp/android-cpp-genrules.md:20 +#, fuzzy msgid "\"cxxbridge\"" -msgstr "" +msgstr "\"cxxbridge\"" -#: src/android/interoperability/cpp/android-cpp-genrules.md +#: src/android/interoperability/cpp/android-cpp-genrules.md:12 +#, fuzzy msgid "\"$(location cxxbridge) $(in) --header > $(out)\"" -msgstr "" +msgstr "\"$(location cxxbridge) $(in) --header > $(out)\"" -#: src/android/interoperability/cpp/android-cpp-genrules.md -#: src/android/interoperability/cpp/android-build-rust.md +#: src/android/interoperability/cpp/android-cpp-genrules.md:13 +#: src/android/interoperability/cpp/android-cpp-genrules.md:22 +#: src/android/interoperability/cpp/android-build-rust.md:8 +#, fuzzy msgid "\"lib.rs\"" -msgstr "" +msgstr "\"lib.rs\"" -#: src/android/interoperability/cpp/android-cpp-genrules.md +#: src/android/interoperability/cpp/android-cpp-genrules.md:14 +#, fuzzy msgid "\"lib.rs.h\"" -msgstr "" +msgstr "\"lib.rs.h\"" -#: src/android/interoperability/cpp/android-cpp-genrules.md +#: src/android/interoperability/cpp/android-cpp-genrules.md:16 +#, fuzzy msgid "// Generate the C++ code that Rust calls into.\n" -msgstr "" +msgstr "// Generarea codului C++ pe care Rust îl apelează.\n" -#: src/android/interoperability/cpp/android-cpp-genrules.md +#: src/android/interoperability/cpp/android-cpp-genrules.md:21 +#, fuzzy msgid "\"$(location cxxbridge) $(in) > $(out)\"" -msgstr "" +msgstr "\"$(locația cxxbridge) $(in) > $(out)\"" -#: src/android/interoperability/cpp/android-cpp-genrules.md +#: src/android/interoperability/cpp/android-cpp-genrules.md:23 +#, fuzzy msgid "\"lib.rs.cc\"" -msgstr "" +msgstr "\"lib.rs.cc\"" -#: src/android/interoperability/cpp/android-cpp-genrules.md +#: src/android/interoperability/cpp/android-cpp-genrules.md:29 +#, fuzzy msgid "" "The `cxxbridge` tool is a standalone tool that generates the C++ side of the " "bridge module. It is included in Android and available as a Soong tool." msgstr "" +"Instrumentul `cxxbridge` este un instrument independent care generează " +"partea C++ a modulului punte. Acesta este inclus în Android și este " +"disponibil ca instrument Soong." -#: src/android/interoperability/cpp/android-cpp-genrules.md +#: src/android/interoperability/cpp/android-cpp-genrules.md:31 +#, fuzzy msgid "" "By convention, if your Rust source file is `lib.rs` your header file will be " "named `lib.rs.h` and your source file will be named `lib.rs.cc`. This naming " "convention isn't enforced, though." msgstr "" +"Prin convenție, dacă fișierul sursă Rust este `lib.rs`, fișierul de antet se " +"va numi `lib.rs.h`, iar fișierul sursă se va numi `lib.rs.cc`. Totuși, " +"această convenție de denumire nu este impusă." -#: src/android/interoperability/cpp/android-build-rust.md +#: src/android/interoperability/cpp/android-build-rust.md:3 +#, fuzzy msgid "" "Create a `rust_binary` that depends on `libcxx` and your `cc_library_static`." msgstr "" +"Creați un `rust_binary` care depinde de `libcxx` și de `cc_library_static`." -#: src/android/interoperability/cpp/android-build-rust.md +#: src/android/interoperability/cpp/android-build-rust.md:7 +#, fuzzy msgid "\"cxx_test\"" -msgstr "" +msgstr "\"cxx_test\"" -#: src/android/interoperability/cpp/android-build-rust.md +#: src/android/interoperability/cpp/android-build-rust.md:9 +#, fuzzy msgid "\"libcxx\"" -msgstr "" +msgstr "\"libcxx\"" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:1 #, fuzzy msgid "Interoperability with Java" msgstr "Interoperabilitate cu Java" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:3 #, fuzzy msgid "" "Java can load shared objects via [Java Native Interface (JNI)](https://en." @@ -14327,81 +16672,92 @@ msgstr "" "(JNI)](https://en.wikipedia.org/wiki/Java_Native_Interface). Crăiasa [`jni` " "crate](https://docs.rs/jni/) vă permite să creați o bibliotecă compatibilă." -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:8 #, fuzzy msgid "First, we create a Rust function to export to Java:" msgstr "Mai întâi, creăm o funcție Rust pentru a exporta în Java:" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:10 #, fuzzy msgid "_interoperability/java/src/lib.rs_:" msgstr "interoperabilitate/java/src/lib.rs_:" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:13 +#, fuzzy msgid "//! Rust <-> Java FFI demo.\n" -msgstr "" +msgstr "//! Rust <-> Java FFI demo.\n" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:18 +#, fuzzy msgid "/// HelloWorld::hello method implementation.\n" -msgstr "" +msgstr "/// Implementarea metodei HelloWorld::hello.\n" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:21 +#, fuzzy msgid "\"system\"" -msgstr "" +msgstr "\"sistem\"" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:27 +#, fuzzy msgid "\"Hello, {input}!\"" -msgstr "" +msgstr "\"Bună ziua, {input}!\"" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:33 +#: src/android/interoperability/java.md:63 #, fuzzy msgid "_interoperability/java/Android.bp_:" msgstr "interoperabilitate/java/Android.bp_:" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:37 +#: src/android/interoperability/java.md:70 +#, fuzzy msgid "\"libhello_jni\"" -msgstr "" +msgstr "\"libhello_jni\"" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:38 +#: src/android/interoperability/java.md:53 +#, fuzzy msgid "\"hello_jni\"" -msgstr "" +msgstr "\"hello_jni\"" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:40 +#, fuzzy msgid "\"libjni\"" -msgstr "" +msgstr "\"libjni\"" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:44 #, fuzzy msgid "We then call this function from Java:" msgstr "În cele din urmă, putem apela această funcție din Java:" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:46 #, fuzzy msgid "_interoperability/java/HelloWorld.java_:" msgstr "interoperabilitate/java/HelloWorld.java_:" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:67 +#, fuzzy msgid "\"helloworld_jni\"" -msgstr "" +msgstr "\"helloworld_jni\"" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:68 #, fuzzy msgid "\"HelloWorld.java\"" msgstr "Bună lume!" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:69 #, fuzzy msgid "\"HelloWorld\"" msgstr "Bună lume!" -#: src/android/interoperability/java.md +#: src/android/interoperability/java.md:74 #, fuzzy msgid "Finally, you can build, sync, and run the binary:" msgstr "" "În cele din urmă, puteți să construiți, să sincronizați și să executați " "programul binar:" -#: src/exercises/android/morning.md +#: src/exercises/android/morning.md:3 #, fuzzy msgid "" "This is a group exercise: We will look at one of the projects you work with " @@ -14410,17 +16766,17 @@ msgstr "" "Acesta este un exercițiu de grup: Ne vom uita la unul dintre proiectele la " "care lucrați și vom încerca să integrăm în el Rust. Câteva sugestii:" -#: src/exercises/android/morning.md +#: src/exercises/android/morning.md:6 #, fuzzy msgid "Call your AIDL service with a client written in Rust." msgstr "Apelați serviciul AIDL cu un client scris în Rust." -#: src/exercises/android/morning.md +#: src/exercises/android/morning.md:8 #, fuzzy msgid "Move a function from your project to Rust and call it." msgstr "Mutați o funcție din proiectul dvs. în Rust și apelați-o." -#: src/exercises/android/morning.md +#: src/exercises/android/morning.md:12 #, fuzzy msgid "" "No solution is provided here since this is open-ended: it relies on someone " @@ -14430,134 +16786,198 @@ msgstr "" "bazează pe faptul că cineva din clasă are o bucată de cod pe care o puteți " "transforma în Rust din mers." -#: src/chromium.md +#: src/chromium.md:1 #, fuzzy msgid "Welcome to Rust in Chromium" msgstr "Bine ați venit la Rust în Android" -#: src/chromium.md +#: src/chromium.md:3 +#, fuzzy msgid "" "Rust is supported for third-party libraries in Chromium, with first-party " "glue code to connect between Rust and existing Chromium C++ code." msgstr "" +"Rust este suportat pentru bibliotecile terților în Chromium, cu un cod de " +"lipire de prima parte pentru a face legătura între Rust și codul C++ " +"existent în Chromium." -#: src/chromium.md +#: src/chromium.md:6 +#, fuzzy msgid "" "Today, we'll call into Rust to do something silly with strings. If you've " "got a corner of the code where you're displaying a UTF8 string to the user, " "feel free to follow this recipe in your part of the codebase instead of the " "exact part we talk about." msgstr "" +"Astăzi, vom apela la Rust pentru a face ceva prostesc cu șiruri de " +"caractere. Dacă aveți un colț de cod în care afișați un șir UTF8 " +"utilizatorului, nu ezitați să urmați această rețetă în partea dvs. de bază " +"de cod în loc de partea despre care vorbim noi." -#: src/chromium/setup.md +#: src/chromium/setup.md:3 +#, fuzzy msgid "" "Make sure you can build and run Chromium. Any platform and set of build " "flags is OK, so long as your code is relatively recent (commit position " "1223636 onwards, corresponding to November 2023):" msgstr "" +"Asigurați-vă că puteți construi și rula Chromium. Orice platformă și orice " +"set de indicatori de compilare este în regulă, atâta timp cât codul dvs. " +"este relativ recent (începând cu poziția de commit 1223636, corespunzând " +"lunii noiembrie 2023):" -#: src/chromium/setup.md +#: src/chromium/setup.md:13 +#, fuzzy msgid "" "(A component, debug build is recommended for quickest iteration time. This " "is the default!)" msgstr "" +"(Pentru un timp de iterație cât mai scurt, se recomandă o componentă, o " +"construcție de depanare. Aceasta este opțiunea implicită)" -#: src/chromium/setup.md +#: src/chromium/setup.md:16 +#, fuzzy msgid "" "See [How to build Chromium](https://www.chromium.org/developers/how-tos/get-" "the-code/) if you aren't already at that point. Be warned: setting up to " "build Chromium takes time." msgstr "" +"Consultați [How to build Chromium](https://www.chromium.org/developers/how-" +"tos/get-the-code/) dacă nu ați ajuns deja în acest punct. Fiți atenți: " +"configurarea pentru a construi Chromium necesită timp." -#: src/chromium/setup.md +#: src/chromium/setup.md:21 +#, fuzzy msgid "It's also recommended that you have Visual Studio code installed." -msgstr "" +msgstr "De asemenea, se recomandă să aveți instalat codul Visual Studio." -#: src/chromium/setup.md +#: src/chromium/setup.md:23 +#, fuzzy msgid "About the exercises" -msgstr "" +msgstr "Despre exerciții" -#: src/chromium/setup.md +#: src/chromium/setup.md:25 +#, fuzzy msgid "" "This part of the course has a series of exercises which build on each other. " "We'll be doing them spread throughout the course instead of just at the end. " "If you don't have time to complete a certain part, don't worry: you can " "catch up in the next slot." msgstr "" +"Această parte a cursului cuprinde o serie de exerciții care se bazează unul " +"pe celălalt. Le vom face repartizate pe tot parcursul cursului și nu doar la " +"sfârșit. Dacă nu aveți timp să terminați o anumită parte, nu vă faceți " +"griji: puteți recupera în intervalul următor." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:3 +#, fuzzy msgid "" -"Rust community typically uses `cargo` and libraries from [crates.io](https://" -"crates.io/). Chromium is built using `gn` and `ninja` and a curated set of " -"dependencies." +"The Rust community typically uses `cargo` and libraries from [crates.io]" +"(https://crates.io/). Chromium is built using `gn` and `ninja` and a curated " +"set of dependencies." msgstr "" +"Comunitatea Rust folosește de obicei `cargo` și bibliotecile din [crates.io]" +"(https://crates.io/). Chromium este construit folosind `gn` și `ninja` și un " +"set curatorial de dependențe." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:6 +#, fuzzy msgid "When writing code in Rust, your choices are:" -msgstr "" +msgstr "Când scrieți cod în Rust, aveți de ales între:" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:8 +#, fuzzy msgid "" "Use `gn` and `ninja` with the help of the templates from `//build/rust/*." "gni` (e.g. `rust_static_library` that we'll meet later). This uses " "Chromium's audited toolchain and crates." msgstr "" +"Utilizați `gn` și `ninja` cu ajutorul șabloanelor din `//build/rust/*.gni` " +"(de exemplu `rust_static_library` pe care îl vom întâlni mai târziu). Acest " +"lucru utilizează toolchain-ul și crates auditate de Chromium." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:11 +#, fuzzy msgid "" "Use `cargo`, but [restrict yourself to Chromium's audited toolchain and " "crates](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/" "docs/rust.md#Using-cargo)" msgstr "" +"Folosiți `cargo`, dar [limitați-vă la lanțul de instrumente și la crates " +"auditate de Chromium](https://chromium.googlesource.com/chromium/src/+/refs/" +"heads/main/docs/rust.md#Using-cargo)" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:13 +#, fuzzy msgid "" "Use `cargo`, trusting a [toolchain](https://rustup.rs/) and/or [crates " "downloaded from the internet](https://crates.io/)" msgstr "" +"Folosiți `cargo`, având încredere într-un [toolchain](https://rustup.rs/) și/" +"sau [lăzi descărcate de pe internet](https://crates.io/)" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:16 +#, fuzzy msgid "" "From here on we'll be focusing on `gn` and `ninja`, because this is how Rust " "code can be built into the Chromium browser. At the same time, Cargo is an " "important part of the Rust ecosystem and you should keep it in your toolbox." msgstr "" +"De aici încolo ne vom concentra pe `gn` și `ninja`, deoarece acesta este " +"modul în care codul Rust poate fi integrat în browserul Chromium. În același " +"timp, Cargo este o parte importantă a ecosistemului Rust și ar trebui să îl " +"păstrați în setul de instrumente." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:20 #, fuzzy msgid "Mini exercise" msgstr "exercițiu:" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:22 +#, fuzzy msgid "Split into small groups and:" -msgstr "" +msgstr "Împărțiți-vă în grupuri mici și:" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:24 +#, fuzzy msgid "" "Brainstorm scenarios where `cargo` may offer an advantage and assess the " "risk profile of these scenarios." msgstr "" +"Gândiți-vă la scenarii în care \"încărcătura\" poate oferi un avantaj și " +"evaluați profilul de risc al acestor scenarii." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:26 +#, fuzzy msgid "" "Discuss which tools, libraries, and groups of people need to be trusted when " "using `gn` and `ninja`, offline `cargo`, etc." msgstr "" +"Discutați ce instrumente, biblioteci și grupuri de persoane trebuie să fie " +"de încredere atunci când se utilizează `gn` și `ninja`, `cargo` offline etc." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:31 +#, fuzzy msgid "" "Ask students to avoid peeking at the speaker notes before completing the " "exercise. Assuming folks taking the course are physically together, ask them " "to discuss in small groups of 3-4 people." msgstr "" +"Cereți elevilor să evite să tragă cu ochiul la notele vorbitorului înainte " +"de a finaliza exercițiul. Presupunând că cei care urmează cursul sunt fizic " +"împreună, rugați-i să discute în grupuri mici de 3-4 persoane." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:35 +#, fuzzy msgid "" "Notes/hints related to the first part of the exercise (\"scenarios where " "Cargo may offer an advantage\"):" msgstr "" +"Note/sugestii legate de prima parte a exercițiului (\"scenarii în care Cargo " +"poate oferi un avantaj\"):" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:38 +#, fuzzy msgid "" "It's fantastic that when writing a tool, or prototyping a part of Chromium, " "one has access to the rich ecosystem of crates.io libraries. There is a " @@ -14565,20 +16985,33 @@ msgid "" "(`clap` for command-line parsing, `serde` for serializing/deserializing to/" "from various formats, `itertools` for working with iterators, etc.)." msgstr "" +"Este fantastic faptul că atunci când se scrie un instrument sau se creează " +"prototipuri pentru o parte din Chromium, se are acces la ecosistemul bogat " +"de biblioteci crates.io. Există un crate pentru aproape orice și, de obicei, " +"acestea sunt destul de plăcute de utilizat. (`clap` pentru parsarea liniei " +"de comandă, `serde` pentru serializare/deserializare în/din diverse formate, " +"`itertools` pentru lucrul cu iteratori, etc.)." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:44 +#, fuzzy msgid "" "`cargo` makes it easy to try a library (just add a single line to `Cargo." "toml` and start writing code)" msgstr "" +"`cargo` face mai ușoară încercarea unei biblioteci (doar adăugați o singură " +"linie la `Cargo.toml` și începeți să scrieți cod)" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:46 +#, fuzzy msgid "" "It may be worth comparing how CPAN helped make `perl` a popular choice. Or " "comparing with `python` + `pip`." msgstr "" +"Poate că merită să comparăm modul în care CPAN a ajutat la transformarea lui " +"`perl` într-o alegere populară. Sau comparând cu `python` + `pip`." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:49 +#, fuzzy msgid "" "Development experience is made really nice not only by core Rust tools (e.g. " "using `rustup` to switch to a different `rustc` version when testing a crate " @@ -14587,22 +17020,39 @@ msgid "" "streamlining and sharing security audits; `criterion` crate gives a " "streamlined way to run benchmarks)." msgstr "" +"Experiența de dezvoltare este foarte plăcută nu numai prin instrumentele " +"Rust de bază (de exemplu, utilizarea `rustup` pentru a trece la o versiune " +"diferită de `rustc` atunci când se testează un crate care trebuie să " +"funcționeze pe nightly, current stable și old stable), ci și printr-un " +"ecosistem de instrumente terțe (de exemplu, Mozilla oferă `cargo vet` pentru " +"simplificarea și partajarea auditurilor de securitate; crate `criterion` " +"oferă o modalitate simplificată de a rula teste de referință)." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:56 +#, fuzzy msgid "" "`cargo` makes it easy to add a tool via `cargo install --locked cargo-vet`." msgstr "" +"`cargo` facilitează adăugarea unui instrument prin `cargo install --locked " +"cargo-vet`." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:57 +#, fuzzy msgid "It may be worth comparing with Chrome Extensions or VScode extensions." msgstr "" +"Ar putea fi utilă o comparație cu extensiile Chrome Extensions sau VScode " +"Extensions." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:59 +#, fuzzy msgid "" "Broad, generic examples of projects where `cargo` may be the right choice:" msgstr "" +"Exemple generale, generice, de proiecte în care `cargo` poate fi alegerea " +"potrivită:" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:61 +#, fuzzy msgid "" "Perhaps surprisingly, Rust is becoming increasingly popular in the industry " "for writing command line tools. The breadth and ergonomics of libraries is " @@ -14610,104 +17060,161 @@ msgid "" "typesystem) and running faster (as a compiled, rather than interpreted " "language)." msgstr "" +"Poate surprinzător, Rust devine din ce în ce mai popular în industrie pentru " +"scrierea instrumentelor de linie de comandă. Amploarea și ergonomia " +"bibliotecilor este comparabilă cu Python, fiind în același timp mai robust " +"(datorită sistemului de tipuri bogat) și funcționând mai rapid (fiind un " +"limbaj compilat, mai degrabă decât interpretat)." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:66 +#, fuzzy msgid "" "Participating in the Rust ecosystem requires using standard Rust tools like " "Cargo. Libraries that want to get external contributions, and want to be " "used outside of Chromium (e.g. in Bazel or Android/Soong build environments) " "should probably use Cargo." msgstr "" +"Participarea la ecosistemul Rust necesită utilizarea instrumentelor standard " +"Rust, cum ar fi Cargo. Bibliotecile care doresc să primească contribuții " +"externe și care doresc să fie utilizate în afara Chromium (de exemplu, în " +"Bazel sau în mediile de compilare Android/Soong) ar trebui probabil să " +"utilizeze Cargo." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:71 +#, fuzzy msgid "Examples of Chromium-related projects that are `cargo`\\-based:" -msgstr "" +msgstr "Exemple de proiecte legate de Chromium care sunt bazate pe `cargo`:" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:72 +#, fuzzy msgid "" "`serde_json_lenient` (experimented with in other parts of Google which " "resulted in PRs with performance improvements)" msgstr "" +"`serde_json_lenient` (experimentat în alte părți ale Google, ceea ce a dus " +"la PR-uri cu îmbunătățiri de performanță)" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:74 +#, fuzzy msgid "Fontations libraries like `font-types`" -msgstr "" +msgstr "Biblioteci de fonturi precum `font-types`" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:75 +#, fuzzy msgid "" "`gnrt` tool (we will meet it later in the course) which depends on `clap` " "for command-line parsing and on `toml` for configuration files." msgstr "" +"instrumentul `gnrt` (îl vom întâlni mai târziu în curs) care depinde de " +"`clap` pentru analiza liniei de comandă și de `toml` pentru fișierele de " +"configurare." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:77 +#, fuzzy msgid "" "Disclaimer: a unique reason for using `cargo` was unavailability of `gn` " "when building and bootstrapping Rust standard library when building Rust " -"toolchain.)" +"toolchain." msgstr "" +"Avertisment: un motiv unic pentru a folosi `cargo` a fost indisponibilitatea " +"lui `gn` la construirea și bootstraparea bibliotecii standard Rust la " +"construirea lanțului de instrumente Rust)" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:80 +#, fuzzy msgid "" "`run_gnrt.py` uses Chromium's copy of `cargo` and `rustc`. `gnrt` depends on " -"third-party libraries downloaded from the internet, by `run_gnrt.py` asks " +"third-party libraries downloaded from the internet, but `run_gnrt.py` asks " "`cargo` that only `--locked` content is allowed via `Cargo.lock`.)" msgstr "" +"`run_gnrt.py` folosește copia Chromium a `cargo` și `rustc`. `gnrt` depinde " +"de biblioteci terțe descărcate de pe internet, prin `run_gnrt.py` cere " +"`cargo` ca numai conținutul `--blocat` să fie permis prin `Cargo.lock`)" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:84 +#, fuzzy msgid "" "Students may identify the following items as being implicitly or explicitly " "trusted:" msgstr "" +"Elevii pot identifica următoarele elemente ca fiind de încredere implicită " +"sau explicită:" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:87 +#, fuzzy msgid "" "`rustc` (the Rust compiler) which in turn depends on the LLVM libraries, the " "Clang compiler, the `rustc` sources (fetched from GitHub, reviewed by Rust " "compiler team), binary Rust compiler downloaded for bootstrapping" msgstr "" +"`rustc` (compilatorul Rust), care la rândul său depinde de bibliotecile " +"LLVM, de compilatorul Clang, de sursele `rustc` (preluate de pe GitHub, " +"revizuite de echipa compilatorului Rust), de compilatorul binar Rust " +"descărcat pentru bootstrap" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:90 +#, fuzzy msgid "" "`rustup` (it may be worth pointing out that `rustup` is developed under the " "umbrella of the https://github.com/rust-lang/ organization - same as `rustc`)" msgstr "" +"`rustup` (poate că merită subliniat faptul că `rustup` este dezvoltat sub " +"umbrela organizației https://github.com/rust-lang/ - la fel ca `rustc`)" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:92 +#, fuzzy msgid "`cargo`, `rustfmt`, etc." -msgstr "" +msgstr "`cargo`, `rustfmt`, etc." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:93 +#, fuzzy msgid "" "Various internal infrastructure (bots that build `rustc`, system for " "distributing the prebuilt toolchain to Chromium engineers, etc.)" msgstr "" +"Diferite infrastructuri interne (roboți care construiesc `rustc`, sistemul " +"de distribuire a lanțului de instrumente pre-construit către inginerii " +"Chromium, etc.)" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:95 +#, fuzzy msgid "Cargo tools like `cargo audit`, `cargo vet`, etc." -msgstr "" +msgstr "Instrumente pentru mărfuri, cum ar fi `cargo audit`, `cargo vet`, etc." -#: src/chromium/cargo.md +#: src/chromium/cargo.md:96 +#, fuzzy msgid "" "Rust libraries vendored into `//third_party/rust` (audited by " "security@chromium.org)" msgstr "" +"Biblioteci Rust vândute în `//third_party/rust` (auditate de " +"security@chromium.org)" -#: src/chromium/cargo.md +#: src/chromium/cargo.md:98 +#, fuzzy msgid "Other Rust libraries (some niche, some quite popular and commonly used)" msgstr "" +"Alte biblioteci Rust (unele de nișă, altele destul de populare și utilizate " +"în mod obișnuit)" -#: src/chromium/policy.md +#: src/chromium/policy.md:1 +#, fuzzy msgid "Chromium Rust policy" -msgstr "" +msgstr "Politica privind rugina de crom" -#: src/chromium/policy.md +#: src/chromium/policy.md:3 +#, fuzzy 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)." msgstr "" +"Chromium nu permite încă Rust de la prima parte, cu excepția unor cazuri " +"rare, aprobate de [Area Tech Leads] (https://source.chromium.org/chromium/" +"chromium/src/+/main:ATL_OWNERS)." -#: src/chromium/policy.md +#: src/chromium/policy.md:7 +#, fuzzy msgid "" "Chromium's policy on third party libraries is outlined [here](https://" "chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party." @@ -14715,15 +17222,24 @@ msgid "" "circumstances, including if they're the best option for performance or for " "security." msgstr "" +"Politica Chromium cu privire la bibliotecile terților este prezentată [aici] " +"(https://chromium.googlesource.com/chromium/src/+/main/docs/" +"adding_to_third_party.md#rust) - Rust este permis pentru bibliotecile " +"terților în diverse circumstanțe, inclusiv dacă acestea reprezintă cea mai " +"bună opțiune pentru performanță sau securitate." -#: src/chromium/policy.md +#: src/chromium/policy.md:12 +#, fuzzy 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." msgstr "" +"Foarte puține biblioteci Rust expun direct un API C/C++, ceea ce înseamnă că " +"aproape toate aceste biblioteci vor necesita o cantitate mică de cod glue de " +"la prima parte." -#: src/chromium/policy.md +#: src/chromium/policy.md:15 #, fuzzy msgid "" "```bob\n" @@ -14763,50 +17279,71 @@ msgstr "" "`- - - - - - - - - - - - -' '- - - - - - - - - - - - - - - - - - - - - - -'\n" "```" -#: src/chromium/policy.md +#: src/chromium/policy.md:30 +#, fuzzy msgid "" "First-party Rust glue code for a particular third-party crate should " "normally be kept in `third_party/rust///wrapper`." msgstr "" +"Codul de lipire Rust de prima parte pentru o anumită crăpătură terță parte " +"ar trebui să fie păstrat în mod normal în `third_party/rust//" +"/wrapper`." -#: src/chromium/policy.md +#: src/chromium/policy.md:33 +#, fuzzy msgid "Because of this, today's course will be heavily focused on:" -msgstr "" +msgstr "Din acest motiv, cursul de astăzi se va concentra pe:" -#: src/chromium/policy.md +#: src/chromium/policy.md:35 +#, fuzzy msgid "Bringing in third-party Rust libraries (\"crates\")" -msgstr "" +msgstr "Introducerea de biblioteci Rust de la terți (\"crates\")" -#: src/chromium/policy.md +#: src/chromium/policy.md:36 +#, fuzzy msgid "Writing glue code to be able to use those crates from Chromium C++." msgstr "" +"Scrierea codului de lipire pentru a putea utiliza aceste crates din Chromium " +"C++." -#: src/chromium/policy.md +#: src/chromium/policy.md:38 +#, fuzzy msgid "If this policy changes over time, the course will evolve to keep up." msgstr "" +"Dacă această politică se schimbă în timp, cursul va evolua pentru a ține " +"pasul cu ea." -#: src/chromium/build-rules.md +#: src/chromium/build-rules.md:1 #, fuzzy msgid "Build rules" msgstr "Reguli de construcție" -#: src/chromium/build-rules.md +#: src/chromium/build-rules.md:3 +#, fuzzy msgid "" "Rust code is usually built using `cargo`. Chromium builds with `gn` and " "`ninja` for efficiency --- its static rules allow maximum parallelism. Rust " "is no exception." msgstr "" +"Codul Rust este de obicei construit folosind `cargo`. Chromium se " +"construiește cu `gn` și `ninja` pentru eficiență --- regulile sale statice " +"permit un paralelism maxim. Rust nu face excepție." -#: src/chromium/build-rules.md +#: src/chromium/build-rules.md:7 +#, fuzzy msgid "Adding Rust code to Chromium" -msgstr "" +msgstr "Adăugarea de cod Rust în Chromium" -#: src/chromium/build-rules.md +#: src/chromium/build-rules.md:9 +#, fuzzy msgid "" "In some existing Chromium `BUILD.gn` file, declare a `rust_static_library`:" msgstr "" +"În unele fișiere Chromium `BUILD.gn` existente, declarați o " +"`rust_static_library`:" -#: src/chromium/build-rules.md +#: src/chromium/build-rules.md:11 +#, fuzzy msgid "" "```gn\n" "import(\"//build/rust/rust_static_library.gni\")\n" @@ -14817,14 +17354,26 @@ msgid "" "}\n" "```" msgstr "" +"```gn\n" +"import(\"//build/rust/rust_static_library.gni\")\n" +"\n" +"rust_static_library(\"my_rust_lib\") {\n" +" crate_root = \"lib.rs\"\n" +" sources = [ \"lib.rs\" ]\n" +"}\n" +"```" -#: src/chromium/build-rules.md +#: src/chromium/build-rules.md:20 +#, fuzzy msgid "" "You can also add `deps` on other Rust targets. Later we'll use this to " "depend upon third party code." msgstr "" +"De asemenea, puteți adăuga `deps` pe alte obiective Rust. Mai târziu vom " +"folosi acest lucru pentru a depinde de codul terților." -#: src/chromium/build-rules.md +#: src/chromium/build-rules.md:25 +#, fuzzy msgid "" "You must specify _both_ the crate root, _and_ a full list of sources. The " "`crate_root` is the file given to the Rust compiler representing the root " @@ -14832,14 +17381,24 @@ msgid "" "list of all source files which `ninja` needs in order to determine when " "rebuilds are necessary." msgstr "" +"Trebuie să specificați atât rădăcina lăzii, cât și o listă completă de " +"surse. `crate_root` este fișierul dat compilatorului Rust care reprezintă " +"fișierul rădăcină al unității de compilare --- de obicei `lib.rs`. `sources` " +"este o listă completă a tuturor fișierelor sursă de care `ninja` are nevoie " +"pentru a determina când sunt necesare reconstrucțiile." -#: src/chromium/build-rules.md +#: src/chromium/build-rules.md:31 +#, fuzzy msgid "" "(There's no such thing as a Rust `source_set`, because in Rust, an entire " "crate is a compilation unit. A `static_library` is the smallest unit.)" msgstr "" +"(Nu există un astfel de lucru ca un `source_set` Rust, deoarece în Rust, un " +"întreg crate este o unitate de compilare. O `static_library` este cea mai " +"mică unitate)" -#: src/chromium/build-rules.md +#: src/chromium/build-rules.md:34 +#, fuzzy msgid "" "Students might be wondering why we need a gn template, rather than using " "[gn's built-in support for Rust static libraries](https://gn.googlesource." @@ -14847,20 +17406,33 @@ msgid "" "this template provides support for CXX interop, Rust features, and unit " "tests, some of which we'll use later." msgstr "" +"Studenții s-ar putea să se întrebe de ce avem nevoie de un șablon gn, în loc " +"să folosim [suportul încorporat al gn pentru bibliotecile statice Rust] " +"(https://gn.googlesource.com/gn/+/main/docs/reference." +"md#func_static_library). Răspunsul este că acest șablon oferă suport pentru " +"interopulare CXX, caracteristici Rust și teste unitare, unele dintre acestea " +"urmând să le folosim mai târziu." -#: src/chromium/build-rules/unsafe.md +#: src/chromium/build-rules/unsafe.md:1 +#, fuzzy msgid "Including `unsafe` Rust Code" -msgstr "" +msgstr "Includerea codului Rust `unsafe` Rust" -#: src/chromium/build-rules/unsafe.md +#: src/chromium/build-rules/unsafe.md:3 +#, fuzzy msgid "" "Unsafe Rust code is forbidden in `rust_static_library` by default --- it " "won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to " "the gn target. (Later in the course we'll see circumstances where this is " "necessary.)" msgstr "" +"Codul Rust nesigur este interzis în `rust_static_library` în mod implicit " +"--- nu va fi compilat. Dacă aveți nevoie de cod Rust nesigur, adăugați " +"`allow_unsafe = true` la ținta gn. (Mai târziu în curs vom vedea " +"circumstanțe în care acest lucru este necesar)" -#: src/chromium/build-rules/unsafe.md +#: src/chromium/build-rules/unsafe.md:7 +#, fuzzy msgid "" "```gn\n" "import(\"//build/rust/rust_static_library.gni\")\n" @@ -14875,12 +17447,27 @@ msgid "" "}\n" "```" msgstr "" +"```gn\n" +"import(\"//build/rust/rust_static_library.gni\")\n" +"\n" +"rust_static_library(\"my_rust_lib\") {\n" +" crate_root = \"lib.rs\"\n" +" sources = [\n" +" \"lib.rs\",\n" +" \"hippopotamus.rs\"\n" +" ]\n" +" allow_unsafe = true\n" +"}\n" +"```" -#: src/chromium/build-rules/depending.md +#: src/chromium/build-rules/depending.md:3 +#, fuzzy msgid "Simply add the above target to the `deps` of some Chromium C++ target." msgstr "" +"Pur și simplu adăugați ținta de mai sus la `deps` a unei ținte Chromium C++." -#: src/chromium/build-rules/depending.md +#: src/chromium/build-rules/depending.md:5 +#, fuzzy msgid "" "```gn\n" "import(\"//build/rust/rust_static_library.gni\")\n" @@ -14896,279 +17483,443 @@ msgid "" "}\n" "```" msgstr "" +"```gn\n" +"import(\"//build/rust/rust_static_library.gni\")\n" +"\n" +"rust_static_library(\"my_rust_lib\") {\n" +" crate_root = \"lib.rs\"\n" +" sources = [ \"lib.rs\" ]\n" +"}\n" +"\n" +"# sau source_set, static_library etc.\n" +"component(\"preexisting_cpp\") {\n" +" deps = [ \":my_rust_lib\" ]\n" +"}\n" +"```" -#: src/chromium/build-rules/vscode.md +#: src/chromium/build-rules/vscode.md:3 +#, fuzzy msgid "" "Types are elided in Rust code, which makes a good IDE even more useful than " "for C++. Visual Studio code works well for Rust in Chromium. To use it," msgstr "" +"Tipurile sunt elidate în codul Rust, ceea ce face ca un IDE bun să fie și " +"mai util decât în cazul C++. Codul Visual Studio funcționează bine pentru " +"Rust în Chromium. Pentru a-l utiliza," -#: src/chromium/build-rules/vscode.md +#: src/chromium/build-rules/vscode.md:6 +#, fuzzy msgid "" "Ensure your VSCode has the `rust-analyzer` extension, not earlier forms of " "Rust support" msgstr "" +"Asigurați-vă că VSCode-ul dumneavoastră are extensia `rust-analyzer`, nu " +"formele anterioare de suport Rust" -#: src/chromium/build-rules/vscode.md +#: src/chromium/build-rules/vscode.md:8 +#, fuzzy msgid "" "`gn gen out/Debug --export-rust-project` (or equivalent for your output " "directory)" msgstr "" +"`gn gen out/Debug --export-rust-project` (sau echivalent pentru directorul " +"de ieșire)" -#: src/chromium/build-rules/vscode.md +#: src/chromium/build-rules/vscode.md:10 +#, fuzzy msgid "`ln -s out/Debug/rust-project.json rust-project.json`" -msgstr "" +msgstr "`ln -s out/Debug/rust-project.json rust-project.json`" -#: src/chromium/build-rules/vscode.md +#: src/chromium/build-rules/vscode.md:16 +#, fuzzy msgid "" "A demo of some of the code annotation and exploration features of rust-" "analyzer might be beneficial if the audience are naturally skeptical of IDEs." msgstr "" +"O demonstrație a unora dintre caracteristicile de adnotare și explorare a " +"codului din rust-analyzer ar putea fi benefică dacă audiența este sceptică " +"în mod natural față de IDE-uri." -#: src/chromium/build-rules/vscode.md +#: src/chromium/build-rules/vscode.md:19 +#, fuzzy msgid "" "The following steps may help with the demo (but feel free to instead use a " "piece of Chromium-related Rust that you are most familiar with):" msgstr "" +"Următorii pași vă pot ajuta cu demonstrația (dar nu ezitați să folosiți în " +"schimb o bucată de Rust legată de Chromium cu care sunteți cel mai " +"familiarizat):" -#: src/chromium/build-rules/vscode.md +#: src/chromium/build-rules/vscode.md:22 +#, fuzzy msgid "Open `components/qr_code_generator/qr_code_generator_ffi_glue.rs`" msgstr "" +"Deschideți `components/qr_code_generator/qr_code_generator_ffi_glue.rs`" -#: src/chromium/build-rules/vscode.md +#: src/chromium/build-rules/vscode.md:23 +#, fuzzy msgid "" "Place the cursor over the `QrCode::new` call (around line 26) in " "\\`qr_code_generator_ffi_glue.rs" msgstr "" +"Așezați cursorul pe apelul `QrCode::new` (în jurul liniei 26) în " +"\\`qr_code_generator_ffi_glue.rs" -#: src/chromium/build-rules/vscode.md +#: src/chromium/build-rules/vscode.md:25 +#, fuzzy msgid "" "Demo **show documentation** (typical bindings: vscode = ctrl k i; vim/CoC = " "K)." msgstr "" +"Demo **afișează documentația** (legături tipice: vscode = ctrl k i; vim/CoC " +"= K)." -#: src/chromium/build-rules/vscode.md +#: src/chromium/build-rules/vscode.md:27 +#, fuzzy msgid "" "Demo **go to definition** (typical bindings: vscode = F12; vim/CoC = g d). " "(This will take you to `//third_party/rust/.../qr_code-.../src/lib.rs`.)" msgstr "" +"Demonstrație **deplasați-vă la definiție** (legături tipice: vscode = F12; " +"vim/CoC = g d). (Acest lucru vă va duce la `//third_party/rust/.../" +"qr_code-.../src/lib.rs`)" -#: src/chromium/build-rules/vscode.md +#: src/chromium/build-rules/vscode.md:29 +#, fuzzy msgid "" "Demo **outline** and navigate to the `QrCode::with_bits` method (around line " "164; the outline is in the file explorer pane in vscode; typical vim/CoC " "bindings = space o)" msgstr "" +"Demo **outline** și navigați până la metoda `QrCode::with_bits` (în jurul " +"liniei 164; conturul este în panoul de explorare a fișierelor din vscode; " +"legături tipice vim/CoC = space o)" -#: src/chromium/build-rules/vscode.md +#: src/chromium/build-rules/vscode.md:32 +#, fuzzy msgid "" "Demo **type annotations** (there are quote a few nice examples in the " "`QrCode::with_bits` method)" msgstr "" +"Demonstrație **Anotații de tip** (există câteva exemple frumoase în metoda " +"`QrCode::with_bits`)" -#: src/chromium/build-rules/vscode.md +#: src/chromium/build-rules/vscode.md:35 +#, fuzzy msgid "" "It may be worth pointing out that `gn gen ... --export-rust-project` will " "need to be rerun after editing `BUILD.gn` files (which we will do a few " "times throughout the exercises in this session)." msgstr "" +"Ar putea fi util să subliniem că `gn gen ... --export-rust-project` va " +"trebui să fie rulat din nou după editarea fișierelor `BUILD.gn` (ceea ce vom " +"face de câteva ori în timpul exercițiilor din această sesiune)." -#: src/exercises/chromium/build-rules.md +#: src/exercises/chromium/build-rules.md:1 #, fuzzy msgid "Build rules exercise" msgstr "Reguli de construcție" -#: src/exercises/chromium/build-rules.md +#: src/exercises/chromium/build-rules.md:3 +#, fuzzy msgid "" "In your Chromium build, add a new Rust target to `//ui/base/BUILD.gn` " "containing:" msgstr "" +"În construcția Chromium, adăugați o nouă țintă Rust la `//ui/base/BUILD.gn` " +"care să conțină:" -#: src/exercises/chromium/build-rules.md +#: src/exercises/chromium/build-rules.md:13 +#, fuzzy msgid "" "**Important**: note that `no_mangle` here is considered a type of unsafety " -"by the Rust compiler, so you'll need to to allow unsafe code in your `gn` " +"by the Rust compiler, so you'll need to allow unsafe code in your `gn` " "target." msgstr "" +"**Important**: rețineți că `no_mangle` aici este considerat un tip de " +"nesiguranță de către compilatorul Rust, deci va trebui să permiteți cod " +"nesigur în ținta `gn`." -#: src/exercises/chromium/build-rules.md +#: src/exercises/chromium/build-rules.md:16 +#, fuzzy msgid "" "Add this new Rust target as a dependency of `//ui/base:base`. Declare this " "function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll " "see how this can be automated by bindings generation tools):" msgstr "" +"Adăugați această nouă țintă Rust ca dependență a `//ui/base:base`. Declarați " +"această funcție în partea de sus a `ui/base/resource/resource_bundle.cc` " +"(mai târziu, vom vedea cum poate fi automatizat acest lucru de către " +"instrumentele de generare a legăturilor):" -#: src/exercises/chromium/build-rules.md +#: src/exercises/chromium/build-rules.md:24 +#, fuzzy msgid "" "Call this function from somewhere in `ui/base/resource/resource_bundle.cc` - " "we suggest the top of `ResourceBundle::MaybeMangleLocalizedString`. Build " "and run Chromium, and ensure that \"Hello from Rust!\" is printed lots of " "times." msgstr "" +"Apelați această funcție de undeva din `ui/base/resource/resource_bundle.cc` " +"- sugerăm partea de sus a `ResourceBundle::MaybeMangleLocalizedString`. " +"Construiți și rulați Chromium și asigurați-vă că \"Hello from Rust!\" este " +"tipărit de multe ori." -#: src/exercises/chromium/build-rules.md +#: src/exercises/chromium/build-rules.md:28 +#, fuzzy msgid "" "If you use VSCode, now set up Rust to work well in VSCode. It will be useful " "in subsequent exercises. If you've succeeded, you will be able to use right-" "click \"Go to definition\" on `println!`." msgstr "" +"Dacă utilizați VSCode, configurați Rust pentru a funcționa bine în VSCode. " +"Aceasta va fi utilă în exercițiile următoare. Dacă ați reușit, veți putea " +"folosi click dreapta \"Go to definition\" pe `println!`." -#: src/exercises/chromium/build-rules.md -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/build-rules.md:32 +#: src/exercises/chromium/interoperability-with-cpp.md:48 +#, fuzzy msgid "Where to find help" -msgstr "" +msgstr "Unde găsiți ajutor" -#: src/exercises/chromium/build-rules.md +#: src/exercises/chromium/build-rules.md:34 +#, fuzzy msgid "" "The options available to the [`rust_static_library` gn template](https://" "source.chromium.org/chromium/chromium/src/+/main:build/rust/" "rust_static_library.gni;l=16)" msgstr "" +"Opțiunile disponibile pentru șablonul [`rust_static_library` gn](https://" +"source.chromium.org/chromium/chromium/src/+/main:build/rust/" +"rust_static_library.gni;l=16)" -#: src/exercises/chromium/build-rules.md +#: src/exercises/chromium/build-rules.md:35 +#, fuzzy msgid "" "Information about [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/" "abi.html#the-no_mangle-attribute)" msgstr "" +"Informații despre [`#[no_mangle]`](https://doc.rust-lang.org/beta/reference/" +"abi.html#the-no_mangle-attribute)" -#: src/exercises/chromium/build-rules.md +#: src/exercises/chromium/build-rules.md:36 +#, fuzzy msgid "" "Information about [`extern \"C\"`](https://doc.rust-lang.org/std/keyword." "extern.html)" msgstr "" +"Informații despre [`extern \"C\"`](https://doc.rust-lang.org/std/keyword." +"extern.html)" -#: src/exercises/chromium/build-rules.md +#: src/exercises/chromium/build-rules.md:37 +#, fuzzy msgid "" "Information about gn's [`--export-rust-project`](https://gn.googlesource.com/" "gn/+/main/docs/reference.md#compilation-database) switch" msgstr "" +"Informații despre comutatorul [`--export-rust-project`](https://gn." +"googlesource.com/gn/+/main/docs/reference.md#compilation-database) de la " +"gn's [`--export-rust-project`](https://gn.googlesource.com/gn/+/main/docs/" +"reference.md#compilation-database)" -#: src/exercises/chromium/build-rules.md +#: src/exercises/chromium/build-rules.md:38 +#, fuzzy msgid "" "[How to install rust-analyzer in VSCode](https://code.visualstudio.com/docs/" "languages/rust)" msgstr "" +"[Cum se instalează rust-analyzer în VSCode](https://code.visualstudio.com/" +"docs/languages/rust)" -#: src/exercises/chromium/build-rules.md +#: src/exercises/chromium/build-rules.md:44 +#, fuzzy msgid "" "This example is unusual because it boils down to the lowest-common-" "denominator interop language, C. Both C++ and Rust can natively declare and " "call C ABI functions. Later in the course, we'll connect C++ directly to " "Rust." msgstr "" +"Acest exemplu este neobișnuit, deoarece se reduce la cel mai mic limbaj de " +"interoperabilitate, C. Atât C++, cât și Rust pot declara și apela în mod " +"nativ funcții ABI C. Mai târziu, în cadrul cursului, vom conecta C++ direct " +"la Rust." -#: src/exercises/chromium/build-rules.md +#: src/exercises/chromium/build-rules.md:48 +#, fuzzy 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." msgstr "" +"`allow_unsafe = true` este necesar aici deoarece `#[no_mangle]` ar putea " +"permite ca Rust să genereze două funcții cu același nume, iar Rust nu mai " +"poate garanta că este apelată cea corectă." -#: src/exercises/chromium/build-rules.md +#: src/exercises/chromium/build-rules.md:52 +#, fuzzy msgid "" "If you need a pure Rust executable, you can also do that using the " "`rust_executable` gn template." msgstr "" +"Dacă aveți nevoie de un executabil Rust pur, puteți face acest lucru " +"folosind șablonul gn `rust_executable`." -#: src/chromium/testing.md +#: src/chromium/testing.md:3 +#, fuzzy msgid "" "Rust community typically authors unit tests in a module placed in the same " "source file as the code being tested. This was covered [earlier](../testing." "md) in the course and looks like this:" msgstr "" +"Comunitatea Rust autorizează de obicei testele unitare într-un modul plasat " +"în același fișier sursă ca și codul testat. Acest lucru a fost abordat [mai " +"devreme](../testing.md) în cadrul cursului și arată astfel:" -#: src/chromium/testing.md +#: src/chromium/testing.md:17 +#, fuzzy msgid "" "In Chromium we place unit tests in a separate source file and we continue to " "follow this practice for Rust --- this makes tests consistently discoverable " "and helps to avoid rebuilding `.rs` files a second time (in the `test` " "configuration)." msgstr "" +"În Chromium plasăm testele unitare într-un fișier sursă separat și continuăm " +"să urmăm această practică pentru Rust --- acest lucru face ca testele să " +"poată fi descoperite în mod constant și ajută la evitarea reconstruirii " +"fișierelor `.rs` a doua oară (în configurația `test`)." -#: src/chromium/testing.md +#: src/chromium/testing.md:22 +#, fuzzy msgid "" "This results in the following options for testing Rust code in Chromium:" msgstr "" +"Acest lucru are ca rezultat următoarele opțiuni pentru testarea codului Rust " +"în Chromium:" -#: src/chromium/testing.md +#: src/chromium/testing.md:24 +#, fuzzy msgid "" "Native Rust tests (i.e. `#[test]`). Discouraged outside of `//third_party/" "rust`." msgstr "" +"Teste Rust native (adică `#[test]`). Descurajat în afara `//third_party/" +"rust`." -#: src/chromium/testing.md +#: src/chromium/testing.md:26 +#, fuzzy msgid "" "`gtest` tests authored in C++ and exercising Rust via FFI calls. Sufficient " "when Rust code is just a thin FFI layer and the existing unit tests provide " "sufficient coverage for the feature." msgstr "" +"teste `gtest` scrise în C++ și care utilizează Rust prin apeluri FFI. " +"Suficient atunci când codul Rust este doar un strat FFI subțire și testele " +"unitare existente oferă o acoperire suficientă pentru această caracteristică." -#: src/chromium/testing.md +#: src/chromium/testing.md:29 +#, fuzzy msgid "" "`gtest` tests authored in Rust and using the crate under test through its " "public API (using `pub mod for_testing { ... }` if needed). This is the " "subject of the next few slides." msgstr "" +"`gtest` testele sunt scrise în Rust și utilizează crate-ul testat prin " +"intermediul API-ului său public (folosind `pub mod for_testing { ... }` dacă " +"este necesar). Acesta este subiectul următoarelor slide-uri." -#: src/chromium/testing.md +#: src/chromium/testing.md:35 +#, fuzzy msgid "" "Mention that native Rust tests of third-party crates should eventually be " "exercised by Chromium bots. (Such testing is needed rarely --- only after " "adding or updating third-party crates.)" msgstr "" +"Menționați că testele Rust native ale craterelor terțe ar trebui să fie în " +"cele din urmă exercitate de roboții Chromium. (Astfel de testări sunt " +"necesare rareori --- doar după adăugarea sau actualizarea unor crates de la " +"terți)" -#: src/chromium/testing.md +#: src/chromium/testing.md:39 +#, fuzzy msgid "" "Some examples may help illustrate when C++ `gtest` vs Rust `gtest` should be " "used:" msgstr "" +"Câteva exemple pot ajuta la ilustrarea momentului în care ar trebui să se " +"utilizeze `gtest` din C++ vs `gtest` din Rust:" -#: src/chromium/testing.md +#: src/chromium/testing.md:42 +#, fuzzy msgid "" "QR has very little functionality in the first-party Rust layer (it's just a " "thin FFI glue) and therefore uses the existing C++ unit tests for testing " "both the C++ and the Rust implementation (parameterizing the tests so they " "enable or disable Rust using a `ScopedFeatureList`)." msgstr "" +"QR are foarte puțină funcționalitate în stratul Rust de primă instanță (este " +"doar un strat subțire de lipire FFI) și, prin urmare, utilizează testele " +"unitare C++ existente pentru testarea atât a implementării C++, cât și a " +"implementării Rust (parametrizând testele astfel încât să activeze sau să " +"dezactiveze Rust utilizând o `ScopedFeatureList`)." -#: src/chromium/testing.md +#: src/chromium/testing.md:47 +#, fuzzy msgid "" "Hypothetical/WIP PNG integration may need to implement memory-safe " "implementation of pixel transformations that are provided by `libpng` but " "missing in the `png` crate - e.g. RGBA => BGRA, or gamma correction. Such " "functionality may benefit from separate tests authored in Rust." msgstr "" +"Integrarea PNG ipotetică/WIP ar putea avea nevoie să implementeze o " +"implementare sigură în memorie a transformărilor de pixeli care sunt " +"furnizate de `libpng`, dar care lipsesc din `png` crate - de exemplu RGBA => " +"BGRA, sau corecția gamma. O astfel de funcționalitate ar putea beneficia de " +"teste separate realizate în Rust." -#: src/chromium/testing/rust-gtest-interop.md +#: src/chromium/testing/rust-gtest-interop.md:3 +#, fuzzy msgid "" "The [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/src/+/" "main/testing/rust_gtest_interop/README.md) library provides a way to:" msgstr "" +"Biblioteca [`rust_gtest_interop`](https://chromium.googlesource.com/chromium/" +"src/+/main/testing/rust_gtest_interop/README.md) oferă o modalitate de a:" -#: src/chromium/testing/rust-gtest-interop.md +#: src/chromium/testing/rust-gtest-interop.md:5 +#, fuzzy msgid "" "Use a Rust function as a `gtest` testcase (using the `#[gtest(...)]` " "attribute)" msgstr "" +"Utilizați o funcție Rust ca și testcase `gtest` (folosind atributul " +"`#[gtest(...)]`)" -#: src/chromium/testing/rust-gtest-interop.md +#: src/chromium/testing/rust-gtest-interop.md:7 +#, fuzzy msgid "" "Use `expect_eq!` and similar macros (similar to `assert_eq!` but not " "panicking and not terminating the test when the assertion fails)." msgstr "" +"Utilizați `expect_eq!` și macrocomenzi similare (similar cu `assert_eq!`, " +"dar fără a intra în panică și fără a încheia testul atunci când afirmația " +"eșuează)." -#: src/chromium/testing/rust-gtest-interop.md -#, fuzzy +#: src/chromium/testing/rust-gtest-interop.md:10 msgid "Example:" -msgstr "Exemplu" +msgstr "Exemplu:" -#: src/chromium/testing/build-gn.md +#: src/chromium/testing/build-gn.md:3 +#, fuzzy msgid "" "The simplest way to build Rust `gtest` tests is to add them to an existing " "test binary that already contains tests authored in C++. For example:" msgstr "" +"Cel mai simplu mod de a construi teste Rust `gtest` este de a le adăuga la " +"un binar de testare existent care conține deja teste scrise în C++. De " +"exemplu:" -#: src/chromium/testing/build-gn.md +#: src/chromium/testing/build-gn.md:6 +#, fuzzy msgid "" "```gn\n" "test(\"ui_base_unittests\") {\n" @@ -15178,14 +17929,26 @@ msgid "" "}\n" "```" msgstr "" +"```gn\n" +"test(\"ui_base_unittests\") {\n" +" ...\n" +" sources += [ \"my_rust_lib_unittest.rs\" ]\n" +" deps += [ \":my_rust_lib\" ]\n" +"}\n" +"```" -#: src/chromium/testing/build-gn.md +#: src/chromium/testing/build-gn.md:14 +#, fuzzy msgid "" "Authoring Rust tests in a separate `static_library` also works, but requires " "manually declaring the dependency on the support libraries:" msgstr "" +"Autorizarea testelor Rust într-o `static_library` separată funcționează, de " +"asemenea, dar necesită declararea manuală a dependenței de bibliotecile de " +"suport:" -#: src/chromium/testing/build-gn.md +#: src/chromium/testing/build-gn.md:17 +#, fuzzy msgid "" "```gn\n" "rust_static_library(\"my_rust_lib_unittests\") {\n" @@ -15205,8 +17968,26 @@ msgid "" "}\n" "```" msgstr "" +"```gn\n" +"rust_static_library(\"my_rust_lib_unittests\") {\n" +" testonly = true\n" +" is_gtest_unittests = true\n" +" crate_root = \"my_rust_lib_unittest.rs\"\n" +" sources = [ \"my_rust_lib_unittest.rs\" ]\n" +" deps = [\n" +" \":my_rust_lib\",\n" +" \"//testing/rust_gtest_interop\",\n" +" ]\n" +"}\n" +"\n" +"test(\"ui_base_unittests\") {\n" +" ...\n" +" deps += [ \":my_rust_lib_unittests\" ]\n" +"}\n" +"```" -#: src/chromium/testing/chromium-import-macro.md +#: src/chromium/testing/chromium-import-macro.md:3 +#, fuzzy msgid "" "After adding `:my_rust_lib` to GN `deps`, we still need to learn how to " "import and use `my_rust_lib` from `my_rust_lib_unittest.rs`. We haven't " @@ -15215,24 +17996,38 @@ msgid "" "working with such an unwieldy name by using the `chromium::import!` macro " "from the automatically-imported `chromium` crate:" msgstr "" +"După ce am adăugat `:my_rust_lib` la GN `deps`, mai trebuie să învățăm cum " +"să importăm și să folosim `my_rust_lib` din `my_rust_lib_unittest.rs`. Nu am " +"furnizat un `crate_name` explicit pentru `my_rust_lib`, astfel încât numele " +"său de crate este calculat pe baza căii și a numelui complet al țintei. Din " +"fericire, putem evita să lucrăm cu un astfel de nume greoi folosind macroul " +"`chromium::import!` din crate-ul `chromium` importat automat:" -#: src/chromium/testing/chromium-import-macro.md +#: src/chromium/testing/chromium-import-macro.md:12 +#, fuzzy msgid "\"//ui/base:my_rust_lib\"" -msgstr "" +msgstr "\"//ui/base:my_rust_lib\"" -#: src/chromium/testing/chromium-import-macro.md +#: src/chromium/testing/chromium-import-macro.md:18 +#, fuzzy msgid "Under the covers the macro expands to something similar to:" -msgstr "" +msgstr "Sub acoperire, macroul se extinde la ceva similar cu:" -#: src/chromium/testing/chromium-import-macro.md +#: src/chromium/testing/chromium-import-macro.md:26 +#, fuzzy msgid "" "More information can be found in [the doc comment](https://source.chromium." "org/chromium/chromium/src/+/main:build/rust/chromium_prelude/" "chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:" "third_party&ss=chromium%2Fchromium%2Fsrc) of the `chromium::import` macro." msgstr "" +"Mai multe informații pot fi găsite în [comentariul doc](https://source." +"chromium.org/chromium/chromium/src/+/main:build/rust/chromium_prelude/" +"chromium_prelude.rs?q=f:chromium_prelude.rs%20pub.use.*%5Cbimport%5Cb;%20-f:" +"third_party&ss=chromium%2Fchromium%2Fsrc) al macroului `chromium::import`." -#: src/chromium/testing/chromium-import-macro.md +#: src/chromium/testing/chromium-import-macro.md:31 +#, fuzzy msgid "" "`rust_static_library` supports specifying an explicit name via `crate_name` " "property, but doing this is discouraged. And it is discouraged because the " @@ -15240,54 +18035,79 @@ msgid "" "crate names so `cargo_crate` GN targets (generated by the `gnrt` tool " "covered in a later section) use short crate names." msgstr "" +"`rust_static_library` acceptă specificarea unui nume explicit prin " +"intermediul proprietății `crate_name`, dar acest lucru este descurajat. Și " +"este descurajată deoarece numele de ladă trebuie să fie unic la nivel " +"global. crates.io garantează unicitatea numelor de ladă, astfel încât " +"țintele GN `cargo_crate` (generate de instrumentul `gnrt`, abordat într-o " +"secțiune ulterioară) utilizează nume de ladă scurte." -#: src/exercises/chromium/testing.md +#: src/exercises/chromium/testing.md:1 #, fuzzy msgid "Testing exercise" msgstr "exercițiu:" -#: src/exercises/chromium/testing.md +#: src/exercises/chromium/testing.md:3 +#, fuzzy msgid "Time for another exercise!" -msgstr "" +msgstr "E timpul pentru un alt exercițiu!" -#: src/exercises/chromium/testing.md +#: src/exercises/chromium/testing.md:5 +#, fuzzy msgid "In your Chromium build:" -msgstr "" +msgstr "În construcția Chromium:" -#: src/exercises/chromium/testing.md +#: src/exercises/chromium/testing.md:7 +#, fuzzy msgid "" "Add a testable function next to `hello_from_rust`. Some suggestions: adding " "two integers received as arguments, computing the nth Fibonacci number, " "summing integers in a slice, etc." msgstr "" +"Adăugați o funcție testabilă lângă `hello_from_rust`. Câteva sugestii: " +"adunarea a două numere întregi primite ca argumente, calcularea celui de-al " +"n-lea număr Fibonacci, însumarea numerelor întregi dintr-o felie etc." -#: src/exercises/chromium/testing.md +#: src/exercises/chromium/testing.md:10 +#, fuzzy msgid "Add a separate `..._unittest.rs` file with a test for the new function." msgstr "" +"Adăugați un fișier separat `..._unittest.rs` cu un test pentru noua funcție." -#: src/exercises/chromium/testing.md +#: src/exercises/chromium/testing.md:11 +#, fuzzy msgid "Add the new tests to `BUILD.gn`." -msgstr "" +msgstr "Adăugați noile teste la `BUILD.gn`." -#: src/exercises/chromium/testing.md +#: src/exercises/chromium/testing.md:12 +#, fuzzy msgid "Build the tests, run them, and verify that the new test works." msgstr "" +"Construiți testele, rulați-le și verificați dacă noul test funcționează." -#: src/chromium/interoperability-with-cpp.md +#: src/chromium/interoperability-with-cpp.md:3 +#, fuzzy msgid "" "The Rust community offers multiple options for C++/Rust interop, with new " "tools being developed all the time. At the moment, Chromium uses a tool " "called CXX." msgstr "" +"Comunitatea Rust oferă mai multe opțiuni pentru interopulare C++/Rust, noi " +"instrumente fiind dezvoltate în permanență. În prezent, Chromium utilizează " +"un instrument numit CXX." -#: src/chromium/interoperability-with-cpp.md +#: src/chromium/interoperability-with-cpp.md:6 +#, fuzzy msgid "" "You describe your whole language boundary in an interface definition " "language (which looks a lot like Rust) and then CXX tools generate " "declarations for functions and types in both Rust and C++." msgstr "" +"Descrieți întreaga graniță a limbajului într-un limbaj de definire a " +"interfețelor (care seamănă foarte mult cu Rust) și apoi instrumentele CXX " +"generează declarații pentru funcții și tipuri atât în Rust, cât și în C++." -#: src/chromium/interoperability-with-cpp.md +#: src/chromium/interoperability-with-cpp.md:12 #, fuzzy msgid "" "See the [CXX tutorial](https://cxx.rs/tutorial.html) for a full example of " @@ -15296,34 +18116,52 @@ msgstr "" "Consultați [CXX tutorial](https://cxx.rs/tutorial.html) pentru un exemplu " "complet de utilizare." -#: src/chromium/interoperability-with-cpp.md +#: src/chromium/interoperability-with-cpp.md:19 +#, fuzzy msgid "" "Talk through the diagram. Explain that behind the scenes, this is doing just " "the same as you previously did. Point out that automating the process has " "the following benefits:" msgstr "" +"Vorbiți despre diagramă. Explicați că, în spatele scenei, aceasta face exact " +"ceea ce ați făcut anterior. Precizați că automatizarea procesului are " +"următoarele avantaje:" -#: src/chromium/interoperability-with-cpp.md +#: src/chromium/interoperability-with-cpp.md:23 +#, fuzzy msgid "" "The tool guarantees that the C++ and Rust sides match (e.g. you get compile " "errors if the `#[cxx::bridge]` doesn't match the actual C++ or Rust " "definitions, but with out-of-sync manual bindings you'd get Undefined " "Behavior)" msgstr "" +"Instrumentul garantează că părțile C++ și Rust se potrivesc (de exemplu, " +"veți obține erori de compilare dacă `#[cxx::bridge]` nu se potrivește cu " +"definițiile reale C++ sau Rust, dar cu legături manuale nesincronizate veți " +"obține Comportament nedefinit)" -#: src/chromium/interoperability-with-cpp.md +#: src/chromium/interoperability-with-cpp.md:27 +#, fuzzy msgid "" "The tool automates generation of FFI thunks (small, C-ABI-compatible, free " "functions) for non-C features (e.g. enabling FFI calls into Rust or C++ " "methods; manual bindings would require authoring such top-level, free " "functions manually)" msgstr "" +"Instrumentul automatizează generarea de thunks FFI (funcții libere mici, " +"compatibile cu C-ABI) pentru caracteristicile non-C (de exemplu, activarea " +"apelurilor FFI în metodele Rust sau C++; legăturile manuale ar necesita " +"crearea manuală a unor astfel de funcții libere de nivel superior)" -#: src/chromium/interoperability-with-cpp.md +#: src/chromium/interoperability-with-cpp.md:31 +#, fuzzy msgid "The tool and the library can handle a set of core types - for example:" msgstr "" +"Instrumentul și biblioteca pot gestiona un set de tipuri de bază - de " +"exemplu:" -#: src/chromium/interoperability-with-cpp.md +#: src/chromium/interoperability-with-cpp.md:32 +#, fuzzy msgid "" "`&[T]` can be passed across the FFI boundary, even though it doesn't " "guarantee any particular ABI or memory layout. With manual bindings `std::" @@ -15331,75 +18169,111 @@ msgid "" "pointer and length - this is error-prone given that each language represents " "empty slices slightly differently)" msgstr "" +"`&[T]` poate fi trecut peste granița FFI, chiar dacă nu garantează o " +"anumită ABI sau o anumită dispunere a memoriei. În cazul legăturilor " +"manuale, `std::span` / `&[T]` trebuie să fie destructurate și " +"reconstruite manual dintr-un pointer și o lungime - acest lucru este " +"predispus la erori, având în vedere că fiecare limbaj reprezintă feliile " +"goale în mod ușor diferit)" -#: src/chromium/interoperability-with-cpp.md +#: src/chromium/interoperability-with-cpp.md:37 +#, fuzzy msgid "" "Smart pointers like `std::unique_ptr`, `std::shared_ptr`, and/or `Box` " "are natively supported. With manual bindings, one would have to pass C-ABI-" "compatible raw pointers, which would increase lifetime and memory-safety " "risks." msgstr "" +"Indicatorii inteligenți, cum ar fi `std::unique_ptr`, `std::" +"shared_ptr` și/sau `Box`, sunt suportați nativ. În cazul legăturilor " +"manuale, ar trebui să se treacă pointeri brute compatibile cu C-ABI, ceea ce " +"ar crește riscurile legate de durata de viață și siguranța memoriei." -#: src/chromium/interoperability-with-cpp.md +#: src/chromium/interoperability-with-cpp.md:41 +#, fuzzy msgid "" "`rust::String` and `CxxString` types understand and maintain differences in " "string representation across the languages (e.g. `rust::String::lossy` can " "build a Rust string from non-UTF8 input and `rust::String::c_str` can NUL-" "terminate a string)." msgstr "" +"tipurile `rust::String` și `CxxString` înțeleg și mențin diferențele de " +"reprezentare a șirurilor de caractere între limbaje (de exemplu, `rust::" +"String::lossy` poate construi un șir Rust de la o intrare non-UTF8 și `rust::" +"String::c_str` poate termina un șir cu NUL)." -#: src/chromium/interoperability-with-cpp/example-bindings.md +#: src/chromium/interoperability-with-cpp/example-bindings.md:3 +#, fuzzy msgid "" "CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` " "modules inside `.rs` source code." msgstr "" +"CXX cere ca întreaga graniță C++/Rust să fie declarată în modulele `cxx::" +"bridge` din codul sursă `.rs`." -#: src/chromium/interoperability-with-cpp/example-bindings.md +#: src/chromium/interoperability-with-cpp/example-bindings.md:16 +#, fuzzy msgid "\"example/include/blobstore.h\"" -msgstr "" +msgstr "\"example/include/blobstore.h\"" -#: src/chromium/interoperability-with-cpp/example-bindings.md +#: src/chromium/interoperability-with-cpp/example-bindings.md:24 +#, fuzzy msgid "// Definitions of Rust types and functions go here\n" -msgstr "" +msgstr "// Definițiile tipurilor și funcțiilor Rust merg aici\n" -#: src/chromium/interoperability-with-cpp/example-bindings.md +#: src/chromium/interoperability-with-cpp/example-bindings.md:30 +#, fuzzy msgid "Point out:" msgstr "" +"Ați putea indica modul în care sunt folosite anumite caractere specifice " +"atunci când se află într-un șablon" -#: src/chromium/interoperability-with-cpp/example-bindings.md +#: src/chromium/interoperability-with-cpp/example-bindings.md:32 +#, fuzzy msgid "" "Although this looks like a regular Rust `mod`, the `#[cxx::bridge]` " "procedural macro does complex things to it. The generated code is quite a " "bit more sophisticated - though this does still result in a `mod` called " "`ffi` in your code." msgstr "" +"Deși acesta arată ca un `mod` obișnuit din Rust, macroul procedural `#[cxx::" +"bridge]` îi face lucruri complexe. Codul generat este mult mai sofisticat - " +"deși acest lucru are ca rezultat un `mod` numit `ffi` în codul dumneavoastră." -#: src/chromium/interoperability-with-cpp/example-bindings.md +#: src/chromium/interoperability-with-cpp/example-bindings.md:36 +#, fuzzy msgid "Native support for C++'s `std::unique_ptr` in Rust" -msgstr "" +msgstr "Suport nativ pentru `std::unique_ptr` din C++ în Rust" -#: src/chromium/interoperability-with-cpp/example-bindings.md +#: src/chromium/interoperability-with-cpp/example-bindings.md:37 #, fuzzy msgid "Native support for Rust slices in C++" msgstr "Suport pentru testare încorporat." -#: src/chromium/interoperability-with-cpp/example-bindings.md +#: src/chromium/interoperability-with-cpp/example-bindings.md:38 +#, fuzzy msgid "Calls from C++ to Rust, and Rust types (in the top part)" -msgstr "" +msgstr "Apeluri din C++ în Rust și tipuri Rust (în partea de sus)" -#: src/chromium/interoperability-with-cpp/example-bindings.md +#: src/chromium/interoperability-with-cpp/example-bindings.md:39 +#, fuzzy msgid "Calls from Rust to C++, and C++ types (in the bottom part)" -msgstr "" +msgstr "Apeluri din Rust în C++ și tipuri C++ (în partea de jos)" -#: src/chromium/interoperability-with-cpp/example-bindings.md +#: src/chromium/interoperability-with-cpp/example-bindings.md:41 +#, fuzzy msgid "" "**Common misconception**: It _looks_ like a C++ header is being parsed by " "Rust, but this is misleading. This header is never interpreted by Rust, but " "simply `#include`d in the generated C++ code for the benefit of C++ " "compilers." msgstr "" +"**Inconștiență greșită frecventă**: Se pare că un antet C++ este analizat de " +"Rust, dar acest lucru este înșelător. Acest antet nu este niciodată " +"interpretat de Rust, ci este pur și simplu `#inclus` în codul C++ generat în " +"beneficiul compilatoarelor C++." -#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md +#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:3 #, fuzzy msgid "" "By far the most useful page when using CXX is the [type reference](https://" @@ -15408,29 +18282,40 @@ msgstr "" "Arătați corespondența dintre [tipurile Rust și C++](https://cxx.rs/bindings." "html):" -#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md +#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:5 +#, fuzzy msgid "CXX fundamentally suits cases where:" -msgstr "" +msgstr "CXX se potrivește în mod fundamental cazurilor în care:" -#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md +#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:7 +#, fuzzy msgid "" "Your Rust-C++ interface is sufficiently simple that you can declare all of " "it." msgstr "" +"Interfața Rust-C++ este suficient de simplă pentru a o putea declara în " +"întregime." -#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md +#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:8 +#, fuzzy msgid "" "You're using only the types natively supported by CXX already, for example " "`std::unique_ptr`, `std::string`, `&[u8]` etc." msgstr "" +"Folosiți doar tipurile suportate nativ de CXX, de exemplu `std::unique_ptr`, " +"`std::string`, `&[u8]` etc." -#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md +#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:11 +#, fuzzy msgid "" "It has many limitations --- for example lack of support for Rust's `Option` " "type." msgstr "" +"Are multe limitări --- de exemplu, lipsa de suport pentru tipul `Option` din " +"Rust." -#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md +#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:14 +#, fuzzy msgid "" "These limitations constrain us to using Rust in Chromium only for well " "isolated \"leaf nodes\" rather than for arbitrary Rust-C++ interop. When " @@ -15438,77 +18323,115 @@ msgid "" "draft the CXX bindings for the language boundary to see if it appears simple " "enough." msgstr "" +"Aceste limitări ne constrâng să folosim Rust în Chromium doar pentru " +"\"noduri de frunze\" bine izolate, mai degrabă decât pentru o interfață Rust-" +"C++ arbitrară. Atunci când se ia în considerare un caz de utilizare pentru " +"Rust în Chromium, un bun punct de plecare este să se redacteze legăturile " +"CXX pentru limita limbajului pentru a vedea dacă pare suficient de simplu." -#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md +#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:26 +#, fuzzy msgid "" "You should also discuss some of the other sticky points with CXX, for " "example:" msgstr "" +"De asemenea, ar trebui să discutați cu CXX despre alte puncte sensibile, de " +"exemplu:" -#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md +#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:28 +#, fuzzy msgid "" "Its error handling is based around C++ exceptions (given on the next slide)" msgstr "" +"Gestionarea erorilor se bazează pe excepțiile C++ (prezentate în slide-ul " +"următor)" -#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md +#: src/chromium/interoperability-with-cpp/limitations-of-cxx.md:29 +#, fuzzy msgid "Function pointers are awkward to use." -msgstr "" +msgstr "Indicatorii de funcție sunt greu de utilizat." -#: src/chromium/interoperability-with-cpp/error-handling.md +#: src/chromium/interoperability-with-cpp/error-handling.md:3 +#, fuzzy msgid "" "CXX's [support for `Result`](https://cxx.rs/binding/result.html) relies " "on C++ exceptions, so we can't use that in Chromium. Alternatives:" msgstr "" +"CXX [suportul pentru `Result`](https://cxx.rs/binding/result.html) se " +"bazează pe excepțiile C++, așa că nu îl putem folosi în Chromium. " +"Alternative:" -#: src/chromium/interoperability-with-cpp/error-handling.md +#: src/chromium/interoperability-with-cpp/error-handling.md:6 +#, fuzzy msgid "The `T` part of `Result` can be:" -msgstr "" +msgstr "Partea `T` din `Result` poate fi:" -#: src/chromium/interoperability-with-cpp/error-handling.md +#: src/chromium/interoperability-with-cpp/error-handling.md:7 +#, fuzzy msgid "" "Returned via out parameters (e.g. via `&mut T`). This requires that `T` can " "be passed across the FFI boundary - for example `T` has to be:" msgstr "" +"Se returnează prin intermediul parametrilor de ieșire (de exemplu, prin " +"`&mut T`). Acest lucru necesită ca `T` să poată fi transmis peste granița " +"FFI - de exemplu, `T` trebuie să fie:" -#: src/chromium/interoperability-with-cpp/error-handling.md +#: src/chromium/interoperability-with-cpp/error-handling.md:9 +#, fuzzy msgid "A primitive type (like `u32` or `usize`)" -msgstr "" +msgstr "Un tip primitiv (cum ar fi `u32` sau `usize`)" -#: src/chromium/interoperability-with-cpp/error-handling.md +#: src/chromium/interoperability-with-cpp/error-handling.md:10 +#, fuzzy msgid "" "A type natively supported by `cxx` (like `UniquePtr`) that has a suitable " "default value to use in a failure case (_unlike_ `Box`)." msgstr "" +"Un tip suportat nativ de `cxx` (precum `UniquePtr`) care are o valoare " +"implicită adecvată pentru a fi utilizată în caz de eșec (spre deosebire de " +"`Box`)." -#: src/chromium/interoperability-with-cpp/error-handling.md +#: src/chromium/interoperability-with-cpp/error-handling.md:12 +#, fuzzy msgid "" "Retained on the Rust side, and exposed via reference. This may be needed " "when `T` is a Rust type, which cannot be passed across the FFI boundary, and " "cannot be stored in `UniquePtr`." msgstr "" +"Reținută pe partea de rugină și expusă prin referință. Acest lucru poate fi " +"necesar atunci când `T` este un tip Rust, care nu poate fi trecut peste " +"granița FFI și nu poate fi stocat în `UniquePtr`." -#: src/chromium/interoperability-with-cpp/error-handling.md +#: src/chromium/interoperability-with-cpp/error-handling.md:16 +#, fuzzy msgid "The `E` part of `Result` can be:" -msgstr "" +msgstr "Partea `E` din `Result` poate fi:" -#: src/chromium/interoperability-with-cpp/error-handling.md +#: src/chromium/interoperability-with-cpp/error-handling.md:17 +#, fuzzy msgid "" "Returned as a boolean (e.g. `true` representing success, and `false` " "representing failure)" msgstr "" +"Se returnează sub formă de boolean (de exemplu, `true` reprezintă succesul, " +"iar `false` reprezintă eșecul)" -#: src/chromium/interoperability-with-cpp/error-handling.md +#: src/chromium/interoperability-with-cpp/error-handling.md:19 +#, fuzzy msgid "" "Preserving error details is in theory possible, but so far hasn't been " "needed in practice." msgstr "" +"Păstrarea detaliilor privind erorile este teoretic posibilă, dar până în " +"prezent nu a fost necesară în practică." -#: src/chromium/interoperability-with-cpp/error-handling-qr.md +#: src/chromium/interoperability-with-cpp/error-handling-qr.md:1 #, fuzzy msgid "CXX Error Handling: QR Example" msgstr "Gestionarea erorilor" -#: src/chromium/interoperability-with-cpp/error-handling-qr.md +#: src/chromium/interoperability-with-cpp/error-handling-qr.md:3 +#, fuzzy msgid "" "The QR code generator is [an example](https://source.chromium.org/chromium/" "chromium/src/+/main:components/qr_code_generator/qr_code_generator_ffi_glue." @@ -15516,72 +18439,110 @@ msgid "" "used to communicate success vs failure, and where the successful result can " "be passed across the FFI boundary:" msgstr "" +"Generatorul de coduri QR este [un exemplu](https://source.chromium.org/" +"chromium/chromium/src/+/main:components/qr_code_generator/" +"qr_code_generator_ffi_glue.rs;l=13-18;" +"drc=7bf1bb75b910ca430501b9c6a74c1d18a0223ecca) în care se utilizează un " +"boolean pentru a comunica succesul vs. eșecul și în care rezultatul de " +"succes poate fi transmis peste granița FFI:" -#: src/chromium/interoperability-with-cpp/error-handling-qr.md +#: src/chromium/interoperability-with-cpp/error-handling-qr.md:8 +#, fuzzy msgid "\"qr_code_generator\"" -msgstr "" +msgstr "\"qr_code_generator\"" -#: src/chromium/interoperability-with-cpp/error-handling-qr.md +#: src/chromium/interoperability-with-cpp/error-handling-qr.md:23 +#, fuzzy msgid "" "Students may be curious about the semantics of the `out_qr_size` output. " "This is not the size of the vector, but the size of the QR code (and " "admittedly it is a bit redundant - this is the square root of the size of " "the vector)." msgstr "" +"Elevii pot fi curioși în legătură cu semantica ieșirii `out_qr_size`. " +"Aceasta nu este dimensiunea vectorului, ci dimensiunea codului QR (și, " +"trebuie să recunoaștem, este un pic redundantă - este rădăcina pătrată a " +"dimensiunii vectorului)." -#: src/chromium/interoperability-with-cpp/error-handling-qr.md +#: src/chromium/interoperability-with-cpp/error-handling-qr.md:27 +#, fuzzy msgid "" "It may be worth pointing out the importance of initializing `out_qr_size` " "before calling into the Rust function. Creation of a Rust reference that " "points to uninitialized memory results in Undefined Behavior (unlike in C++, " "when only the act of dereferencing such memory results in UB)." msgstr "" +"Ar putea fi util să subliniem importanța inițializării `out_qr_size` înainte " +"de a apela la funcția Rust. Crearea unei referințe Rust care indică o " +"memorie neinițializată are ca rezultat un comportament nedefinit (spre " +"deosebire de C++, când numai actul de dereferențiere a unei astfel de " +"memorii are ca rezultat UB)." -#: src/chromium/interoperability-with-cpp/error-handling-qr.md +#: src/chromium/interoperability-with-cpp/error-handling-qr.md:32 +#, fuzzy msgid "" "If students ask about `Pin`, then explain why CXX needs it for mutable " "references to C++ data: the answer is that C++ data can’t be moved around " "like Rust data, because it may contain self-referential pointers." msgstr "" +"Dacă elevii întreabă despre `Pin`, explicați-le de ce CXX are nevoie de el " +"pentru referințele mutabile la datele C++: răspunsul este că datele C++ nu " +"pot fi mutate ca și datele Rust, deoarece pot conține pointeri " +"autoreferențiali." -#: src/chromium/interoperability-with-cpp/error-handling-png.md +#: src/chromium/interoperability-with-cpp/error-handling-png.md:1 #, fuzzy msgid "CXX Error Handling: PNG Example" msgstr "Gestionarea erorilor" -#: src/chromium/interoperability-with-cpp/error-handling-png.md +#: src/chromium/interoperability-with-cpp/error-handling-png.md:3 +#, fuzzy msgid "" "A prototype of a PNG decoder illustrates what can be done when the " "successful result cannot be passed across the FFI boundary:" msgstr "" +"Un prototip al unui decodor PNG ilustrează ce se poate face atunci când " +"rezultatul pozitiv nu poate fi transmis peste granița FFI:" -#: src/chromium/interoperability-with-cpp/error-handling-png.md +#: src/chromium/interoperability-with-cpp/error-handling-png.md:7 +#, fuzzy msgid "\"gfx::rust_bindings\"" -msgstr "" +msgstr "\"gfx::rust_bindings\"" -#: src/chromium/interoperability-with-cpp/error-handling-png.md +#: src/chromium/interoperability-with-cpp/error-handling-png.md:10 +#, fuzzy msgid "" "/// This returns an FFI-friendly equivalent of `Result,\n" " /// ()>`.\n" msgstr "" +"/// Aceasta returnează un echivalent FFI-friendly al `Result,\n" +" /// ()>`.\n" -#: src/chromium/interoperability-with-cpp/error-handling-png.md +#: src/chromium/interoperability-with-cpp/error-handling-png.md:14 +#, fuzzy msgid "/// C++ bindings for the `crate::png::ResultOfPngReader` type.\n" -msgstr "" +msgstr "/// Legături C++ pentru tipul `crate::png::ResultOfPngReader`.\n" -#: src/chromium/interoperability-with-cpp/error-handling-png.md +#: src/chromium/interoperability-with-cpp/error-handling-png.md:21 +#, fuzzy msgid "/// C++ bindings for the `crate::png::PngReader` type.\n" -msgstr "" +msgstr "/// Legături C++ pentru tipul `crate::png::PngReader`.\n" -#: src/chromium/interoperability-with-cpp/error-handling-png.md +#: src/chromium/interoperability-with-cpp/error-handling-png.md:32 +#, fuzzy msgid "" "`PngReader` and `ResultOfPngReader` are Rust types --- objects of these " "types cannot cross the FFI boundary without indirection of a `Box`. We " "can't have an `out_parameter: &mut PngReader`, because CXX doesn't allow C++ " "to store Rust objects by value." msgstr "" +"`PngReader` și `ResultOfPngReader` sunt tipuri Rust --- obiectele din aceste " +"tipuri nu pot trece granița FFI fără o indirecțiune a unui `Box`. Nu " +"putem avea un `out_parameter: &mut PngReader`, deoarece CXX nu permite " +"ca C++ să stocheze obiecte Rust prin valoare." -#: src/chromium/interoperability-with-cpp/error-handling-png.md +#: src/chromium/interoperability-with-cpp/error-handling-png.md:37 +#, fuzzy msgid "" "This example illustrates that even though CXX doesn't support arbitrary " "generics nor templates, we can still pass them across the FFI boundary by " @@ -15590,19 +18551,31 @@ msgid "" "appropriate methods of `Result` (e.g. into `is_err`, `unwrap`, and/or " "`as_mut`)." msgstr "" +"Acest exemplu ilustrează faptul că, chiar dacă CXX nu acceptă generici " +"arbitrari și nici șabloane, putem totuși să le trecem peste granița FFI prin " +"specializarea / monomorfizarea manuală într-un tip non-generic. În exemplu, " +"`ResultOfPngReader` este un tip ne-generic care se transmite în metodele " +"corespunzătoare ale `Result` (de exemplu, în `is_err`, `unwrap` și/sau " +"`as_mut`)." -#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md +#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:1 +#, fuzzy msgid "Using cxx in Chromium" -msgstr "" +msgstr "Utilizarea CXX în Chromium" -#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md +#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:3 +#, fuzzy msgid "" "In Chromium, we define an independent `#[cxx::bridge] mod` for each leaf-" "node where we want to use Rust. You'd typically have one for each " "`rust_static_library`. Just add" msgstr "" +"În Chromium, definim un `#[cxx::bridge] mod` independent pentru fiecare nod " +"frunză în care dorim să folosim Rust. De obicei, veți avea unul pentru " +"fiecare `rust_static_library`. Trebuie doar să adăugați" -#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md +#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:7 +#, fuzzy msgid "" "```gn\n" "cxx_bindings = [ \"my_rust_file.rs\" ]\n" @@ -15610,34 +18583,54 @@ msgid "" "allow_unsafe = true\n" "```" msgstr "" +"```gn\n" +"cxx_bindings = [ \"my_rust_file.rs\" ]\n" +" # listă de fișiere care conțin #[cxx::bridge], nu toate fișierele sursă\n" +"allow_unsafe = true\n" +"```" -#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md +#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:13 +#, fuzzy msgid "" "to your existing `rust_static_library` target alongside `crate_root` and " "`sources`." msgstr "" +"la ținta `rust_static_library` existentă, alături de `crate_root` și " +"`sources`." -#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md +#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:16 +#, fuzzy msgid "C++ headers will be generated at a sensible location, so you can just" msgstr "" +"Anteturile C++ vor fi generate într-o locație sensibilă, astfel încât puteți " +"doar să" -#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md +#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:19 +#, fuzzy msgid "\"ui/base/my_rust_file.rs.h\"" -msgstr "" +msgstr "\"ui/base/my_rust_file.rs.h\"" -#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md +#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:22 +#, fuzzy msgid "" "You will find some utility functions in `//base` to convert to/from Chromium " "C++ types to CXX Rust types --- for example [`SpanToRustSlice`](https://" "source.chromium.org/chromium/chromium/src/+/main:base/containers/span_rust.h;" "l=21)." msgstr "" +"Veți găsi câteva funcții utilitare în `//base` pentru a converti la/de la " +"tipurile Chromium C++ la tipurile CXX Rust --- de exemplu [`SpanToRustSlice`]" +"(https://source.chromium.org/chromium/chromium/src/+/main:base/containers/" +"span_rust.h;l=21)." -#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md +#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:27 +#, fuzzy msgid "Students may ask --- why do we still need `allow_unsafe = true`?" msgstr "" +"Studenții se pot întreba --- de ce mai avem nevoie de `allow_unsafe = true`?" -#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md +#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:29 +#, fuzzy msgid "" "The broad answer is that no C/C++ code is \"safe\" by the normal Rust " "standards. Calling back and forth to C/C++ from Rust may do arbitrary things " @@ -15647,268 +18640,381 @@ msgid "" "writing/the-cxx-debate), but strictly, bringing any foreign code into a Rust " "binary can cause unexpected behavior from Rust's perspective." msgstr "" +"Răspunsul general este că nici un cod C/C++ nu este \"sigur\" după " +"standardele Rust obișnuite. Apelarea din Rust către C/C++ poate face lucruri " +"arbitrare în memorie și poate compromite siguranța propriilor aranjamente de " +"date din Rust. Prezența a _prea multor_ cuvinte cheie `unsafe` în interop C/" +"C++ poate dăuna raportului semnal-zgomot al unui astfel de cuvânt cheie și " +"este [controversată](https://steveklabnik.com/writing/the-cxx-debate), dar, " +"strict, aducerea oricărui cod străin într-un binar Rust poate cauza un " +"comportament neașteptat din perspectiva Rust." -#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md +#: src/chromium/interoperability-with-cpp/using-cxx-in-chromium.md:36 +#, fuzzy msgid "" "The narrow answer lies in the diagram at the top of [this page](../" "interoperability-with-cpp.md) --- behind the scenes, CXX generates Rust " "`unsafe` and `extern \"C\"` functions just like we did manually in the " "previous section." msgstr "" +"Răspunsul restrâns se află în diagrama din partea de sus a [acestei pagini]" +"(../interoperabilitate-cu-cpp.md) --- în spatele scenei, CXX generează " +"funcții Rust `unsafe` și `extern \"C\"` exact așa cum am făcut manual în " +"secțiunea anterioară." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:1 #, fuzzy msgid "Exercise: Interoperability with C++" msgstr "Interoperabilitate cu C" -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:3 +#, fuzzy msgid "Part one" -msgstr "" +msgstr "Prima parte" -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:5 +#, fuzzy msgid "" "In the Rust file you previously created, add a `#[cxx::bridge]` which " "specifies a single function, to be called from C++, called " "`hello_from_rust`, taking no parameters and returning no value." msgstr "" +"În fișierul Rust pe care l-ați creat anterior, adăugați un `#[cxx::bridge]` " +"care specifică o singură funcție, care va fi apelată din C++, numită " +"`hello_from_rust`, care nu primește parametri și nu returnează nicio valoare." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:8 +#, fuzzy msgid "" "Modify your previous `hello_from_rust` function to remove `extern \"C\"` and " "`#[no_mangle]`. This is now just a standard Rust function." msgstr "" +"Modificați funcția `hello_from_rust` anterioară pentru a elimina `extern " +"\"C\"` și `#[no_mangle]`. Aceasta este acum doar o funcție Rust standard." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:10 +#, fuzzy msgid "Modify your `gn` target to build these bindings." -msgstr "" +msgstr "Modificați ținta `gn` pentru a construi aceste legături." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:11 +#, fuzzy msgid "" "In your C++ code, remove the forward-declaration of `hello_from_rust`. " "Instead, include the generated header file." msgstr "" +"În codul dvs. C++, eliminați declarația forward a lui `hello_from_rust`. În " +"schimb, includeți fișierul antet generat." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:13 +#, fuzzy msgid "Build and run!" -msgstr "" +msgstr "Construiește și rulează!" -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:15 +#, fuzzy msgid "Part two" -msgstr "" +msgstr "Partea a doua" -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:17 +#, fuzzy msgid "" "It's a good idea to play with CXX a little. It helps you think about how " "flexible Rust in Chromium actually is." msgstr "" +"Este o idee bună să vă jucați puțin cu CXX. Vă ajută să vă gândiți la cât de " +"flexibil este de fapt Rust în Chromium." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:20 #, fuzzy msgid "Some things to try:" msgstr "Câteva note:" -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:22 +#, fuzzy msgid "Call back into C++ from Rust. You will need:" -msgstr "" +msgstr "Apelarea înapoi în C++ din Rust. Veți avea nevoie de:" -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:23 +#, fuzzy msgid "" "An additional header file which you can `include!` from your `cxx::bridge`. " "You'll need to declare your C++ function in that new header file." msgstr "" +"Un fișier header suplimentar pe care îl puteți `include!` din `cxx::bridge`. " +"Va trebui să vă declarați funcția C++ în acest nou fișier de antet." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:25 +#, fuzzy msgid "" "An `unsafe` block to call such a function, or alternatively specify the " "`unsafe` keyword in your `#[cxx::bridge]` [as described here](https://cxx.rs/" "extern-c++.html#functions-and-member-functions)." msgstr "" +"Un bloc `unsafe` pentru a apela o astfel de funcție sau, alternativ, " +"specificați cuvântul cheie `unsafe` în `#[cxx::bridge]` [așa cum este " +"descris aici](https://cxx.rs/extern-c++.html#functions-and-member-functions)." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:27 +#, fuzzy msgid "" "You may also need to `#include \"third_party/rust/cxx/v1/crate/include/cxx." "h\"`" msgstr "" +"Este posibil să aveți nevoie și de `#include \"third_party/rust/cxx/v1/crate/" +"include/cxx.h\"``" -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:29 +#, fuzzy msgid "Pass a C++ string from C++ into Rust." -msgstr "" +msgstr "Treceți un șir C++ din C++ în Rust." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:30 +#, fuzzy msgid "Pass a reference to a C++ object into Rust." -msgstr "" +msgstr "Treceți o referință la un obiect C++ în Rust." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:31 +#, fuzzy msgid "" "Intentionally get the Rust function signatures mismatched from the `#[cxx::" "bridge]`, and get used to the errors you see." msgstr "" +"Obțineți în mod intenționat semnăturile funcțiilor Rust nepotrivite din " +"`#[cxx::bridge]` și obișnuiți-vă cu erorile pe care le vedeți." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:33 +#, fuzzy msgid "" "Intentionally get the C++ function signatures mismatched from the `#[cxx::" "bridge]`, and get used to the errors you see." msgstr "" +"Obțineți în mod intenționat semnăturile funcțiilor C++ nepotrivite din " +"`#[cxx::bridge]` și obișnuiți-vă cu erorile pe care le vedeți." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:35 +#, fuzzy msgid "" "Pass a `std::unique_ptr` of some type from C++ into Rust, so that Rust can " "own some C++ object." msgstr "" +"Treceți un `std::unique_ptr` de un anumit tip din C++ în Rust, astfel încât " +"Rust să poată deține un obiect C++." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:37 +#, fuzzy msgid "" "Create a Rust object and pass it into C++, so that C++ owns it. (Hint: you " "need a `Box`)." msgstr "" +"Creați un obiect Rust și treceți-l în C++, astfel încât C++ să îl dețină. " +"(Indicație: aveți nevoie de un `Box`)." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:39 +#, fuzzy msgid "Declare some methods on a C++ type. Call them from Rust." -msgstr "" +msgstr "Declararea unor metode pentru un tip C++. Apelați-le din Rust." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:40 +#, fuzzy msgid "Declare some methods on a Rust type. Call them from C++." -msgstr "" +msgstr "Declararea unor metode pentru un tip Rust. Apelați-le din C++." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:42 +#, fuzzy msgid "Part three" -msgstr "" +msgstr "Partea a treia" -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:44 +#, fuzzy msgid "" "Now you understand the strengths and limitations of CXX interop, think of a " "couple of use-cases for Rust in Chromium where the interface would be " "sufficiently simple. Sketch how you might define that interface." msgstr "" +"Acum că ați înțeles punctele forte și limitările interoperării CXX, gândiți-" +"vă la câteva cazuri de utilizare pentru Rust în Chromium în care interfața " +"ar fi suficient de simplă. Schițați cum ați putea defini această interfață." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:50 #, fuzzy msgid "The [`cxx` binding reference](https://cxx.rs/bindings.html)" msgstr "" "Arătați corespondența dintre [tipurile Rust și C++](https://cxx.rs/bindings." "html):" -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:51 +#, fuzzy msgid "" "The [`rust_static_library` gn template](https://source.chromium.org/chromium/" "chromium/src/+/main:build/rust/rust_static_library.gni;l=16)" msgstr "" +"Șablonul [`rust_static_library` gn](https://source.chromium.org/chromium/" +"chromium/src/+/main:build/rust/rust/rust_static_library.gni;l=16)" -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:57 +#, fuzzy msgid "Some of the questions you may encounter:" -msgstr "" +msgstr "Câteva dintre întrebările pe care le puteți întâlni:" -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:59 +#, fuzzy msgid "" "I'm seeing a problem initializing a variable of type X with type Y, where X " "and Y are both function types. This is because your C++ function doesn't " "quite match the declaration in your `cxx::bridge`." msgstr "" +"Am o problemă în ceea ce privește inițializarea unei variabile de tip X cu " +"tipul Y, unde X și Y sunt ambele tipuri de funcții. Acest lucru se datorează " +"faptului că funcția dvs. C++ nu se potrivește cu declarația din `cxx::" +"bridge`." -#: src/exercises/chromium/interoperability-with-cpp.md +#: src/exercises/chromium/interoperability-with-cpp.md:62 +#, fuzzy msgid "" "I seem to be able to freely convert C++ references into Rust references. " "Doesn't that risk UB? For CXX's _opaque_ types, no, because they are zero-" "sized. For CXX trivial types yes, it's _possible_ to cause UB, although " "CXX's design makes it quite difficult to craft such an example." msgstr "" +"Se pare că pot converti în mod liber referințele C++ în referințe Rust. Nu " +"riscă asta UB? În cazul tipurilor _opaque_ din CXX, nu, deoarece acestea " +"sunt de dimensiune zero. Pentru tipurile triviale din CXX, da, este " +"_posibil_ să provoace UB, deși designul CXX face destul de dificilă crearea " +"unui astfel de exemplu." -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:3 +#, fuzzy msgid "" "Rust libraries are called \"crates\" and are found at [crates.io](https://" "crates.io). It's _very easy_ for Rust crates to depend upon one another. So " "they do!" msgstr "" +"Bibliotecile Rust se numesc \"crates\" și se găsesc la [crates.io](https://" +"crates.io). Este _foarte ușor_ pentru crates Rust să depindă unele de " +"altele. Așa că o fac!" + +#: src/chromium/adding-third-party-crates.md:6 +msgid "Property" +msgstr "Proprietate" -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:6 #, fuzzy msgid "C++ library" msgstr "bibliotecă:" -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:6 #, fuzzy msgid "Rust crate" msgstr "Ecosistemul Rust" -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:8 #, fuzzy msgid "Build system" -msgstr "Ecosistemul Rust" +msgstr "" +"Veți avea nevoie de un [sursele AOSP](https://source.android.com/docs/setup/" +"download/downloading). Efectuați o descărcare a [resurselor cursului]" +"(https://github.com/google/comprehensive-rust) pe aceeași mașină și mutați " +"directorul `src/android/` în rădăcina surselor AOSP. Acest lucru va asigura " +"că sistemul de compilare Android vede fișierele `Android.bp` din `src/" +"android/`." -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:8 +#: src/chromium/adding-third-party-crates.md:10 msgid "Lots" -msgstr "" +msgstr "Multe" -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:8 #, fuzzy msgid "Consistent: `Cargo.toml`" msgstr "Puteți utiliza următorul `Cargo.toml`:" -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:9 +#, fuzzy msgid "Typical library size" -msgstr "" +msgstr "Dimensiunea tipică a bibliotecii" -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:9 +#, fuzzy msgid "Large-ish" -msgstr "" +msgstr "Mare-ish" -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:9 msgid "Small" -msgstr "" +msgstr "Mic" -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:10 +#, fuzzy msgid "Transitive dependencies" -msgstr "" +msgstr "Dependențe tranzitive" -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:10 msgid "Few" -msgstr "" +msgstr "Iată câteva link-uri utile pentru a obține ajutor pe parcurs" -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:12 +#, fuzzy msgid "For a Chromium engineer, this has pros and cons:" -msgstr "" +msgstr "Pentru un inginer Chromium, acest lucru are avantaje și dezavantaje:" -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:14 +#, fuzzy msgid "" "All crates use a common build system so we can automate their inclusion into " "Chromium..." msgstr "" +"Toate craterele folosesc un sistem comun de construire, astfel încât să " +"putem automatiza includerea lor în Chromium..." -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:16 +#, fuzzy msgid "" "... but, crates typically have transitive dependencies, so you will likely " "have to bring in multiple libraries." msgstr "" +"... dar, de obicei, crates are dependențe tranzitive, așa că va trebui " +"probabil să introduceți mai multe biblioteci." -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:19 +#, fuzzy msgid "We'll discuss:" -msgstr "" +msgstr "Vom discuta:" -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:21 +#, fuzzy msgid "How to put a crate in the Chromium source code tree" -msgstr "" +msgstr "Cum se pune o casetă în arborele de cod sursă Chromium" -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:22 +#, fuzzy msgid "How to make `gn` build rules for it" -msgstr "" +msgstr "Cum să faci regulile de construcție `gn` pentru el" -#: src/chromium/adding-third-party-crates.md +#: src/chromium/adding-third-party-crates.md:23 +#, fuzzy msgid "How to audit its source code for sufficient safety." -msgstr "" +msgstr "Cum se auditează codul sursă pentru a asigura o siguranță suficientă." -#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md +#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md:1 +#, fuzzy msgid "Configuring the `Cargo.toml` file to add crates" -msgstr "" +msgstr "Configurarea fișierului `Cargo.toml` pentru a adăuga lăzi" -#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md +#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md:3 +#, fuzzy msgid "" "Chromium has a single set of centrally-managed direct crate dependencies. " "These are managed through a single [`Cargo.toml`](https://source.chromium." "org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/Cargo." "toml):" msgstr "" +"Chromium are un singur set de dependențe directe de crate gestionate la " +"nivel central. Acestea sunt gestionate prin intermediul unui singur [`Cargo." +"toml`](https://source.chromium.org/chromium/chromium/src/+/main:third_party/" +"rust/chromium_crates_io/Cargo.toml):" -#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md +#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md:6 +#, fuzzy msgid "" "```toml\n" "[dependencies]\n" @@ -15918,121 +19024,181 @@ msgid "" "# lots more...\n" "```" msgstr "" +"```toml\n" +"[dependențe]\n" +"bitflags = \"1\"\n" +"cfg-if = \"1\"\n" +"cxx = \"1\"\n" +"# multe altele...\n" +"```" -#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md +#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md:14 +#, fuzzy msgid "" "As with any other `Cargo.toml`, you can specify [more details about the " "dependencies](https://doc.rust-lang.org/cargo/reference/specifying-" "dependencies.html) --- most commonly, you'll want to specify the `features` " "that you wish to enable in the crate." msgstr "" +"Ca și în cazul oricărui alt `Cargo.toml`, puteți specifica [mai multe " +"detalii despre dependențe](https://doc.rust-lang.org/cargo/reference/" +"specifying-dependencies.html) --- cel mai frecvent, veți dori să specificați " +"`features` pe care doriți să le activați în crate." -#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md +#: src/chromium/adding-third-party-crates/configuring-cargo-toml.md:18 +#, fuzzy msgid "" "When adding a crate to Chromium, you'll often need to provide some extra " "information in an additional file, `gnrt_config.toml`, which we'll meet next." msgstr "" +"Atunci când adăugați un crate la Chromium, va trebui adesea să furnizați " +"câteva informații suplimentare într-un fișier suplimentar, `gnrt_config." +"toml`, pe care îl vom întâlni în continuare." -#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md +#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md:3 +#, fuzzy msgid "" "Alongside `Cargo.toml` is [`gnrt_config.toml`](https://source.chromium.org/" "chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/gnrt_config." "toml). This contains Chromium-specific extensions to crate handling." msgstr "" +"Alături de `Cargo.toml` se află [`gnrt_config.toml`](https://source.chromium." +"org/chromium/chromium/src/+/main:third_party/rust/chromium_crates_io/" +"gnrt_config.toml). Acesta conține extensii specifice Chromium pentru " +"gestionarea crate-urilor." -#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md +#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md:6 +#, fuzzy msgid "" "If you add a new crate, you should specify at least the `group`. This is one " "of:" msgstr "" +"Dacă adăugați o ladă nouă, trebuie să specificați cel puțin `group`. Acesta " +"este unul dintre următoarele:" -#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md -#: src/chromium/adding-third-party-crates/depending-on-a-crate.md +#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md:15 +#: src/chromium/adding-third-party-crates/depending-on-a-crate.md:15 +#, fuzzy msgid "For instance," -msgstr "" +msgstr "De exemplu," -#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md +#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md:22 +#, fuzzy msgid "" "Depending on the crate source code layout, you may also need to use this " "file to specify where its `LICENSE` file(s) can be found." msgstr "" +"În funcție de dispunerea codului sursă al crate-ului, este posibil să fie " +"nevoie să folosiți acest fișier pentru a specifica unde pot fi găsite " +"fișierul (fișierele) `LICENSE`." -#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md +#: src/chromium/adding-third-party-crates/configuring-gnrt-config-toml.md:25 +#, fuzzy msgid "" "Later, we'll see some other things you will need to configure in this file " "to resolve problems." msgstr "" +"Mai târziu, vom vedea alte lucruri pe care va trebui să le configurați în " +"acest fișier pentru a rezolva problemele." -#: src/chromium/adding-third-party-crates/downloading-crates.md +#: src/chromium/adding-third-party-crates/downloading-crates.md:3 +#, fuzzy msgid "" "A tool called `gnrt` knows how to download crates and how to generate `BUILD." "gn` rules." msgstr "" +"Un instrument numit `gnrt` știe cum să descarce crates și cum să genereze " +"regulile `BUILD.gn`." -#: src/chromium/adding-third-party-crates/downloading-crates.md +#: src/chromium/adding-third-party-crates/downloading-crates.md:6 +#, fuzzy msgid "To start, download the crate you want like this:" -msgstr "" +msgstr "Pentru a începe, descărcați caseta pe care o doriți, astfel:" -#: src/chromium/adding-third-party-crates/downloading-crates.md +#: src/chromium/adding-third-party-crates/downloading-crates.md:13 +#, fuzzy msgid "" "Although the `gnrt` tool is part of the Chromium source code, by running " "this command you will be downloading and running its dependencies from " "`crates.io`. See [the earlier section](../cargo.md) discussing this security " "decision." msgstr "" +"Deși instrumentul `gnrt` face parte din codul sursă Chromium, prin rularea " +"acestei comenzi veți descărca și rula dependențele sale de pe `crates.io`. " +"Consultați [secțiunea anterioară](../cargo.md) în care se discută această " +"decizie de securitate." -#: src/chromium/adding-third-party-crates/downloading-crates.md +#: src/chromium/adding-third-party-crates/downloading-crates.md:17 +#, fuzzy msgid "This `vendor` command may download:" -msgstr "" +msgstr "Această comandă `vendor` poate descărca:" -#: src/chromium/adding-third-party-crates/downloading-crates.md +#: src/chromium/adding-third-party-crates/downloading-crates.md:19 #, fuzzy msgid "Your crate" msgstr "Lăzi (crates) utile" -#: src/chromium/adding-third-party-crates/downloading-crates.md +#: src/chromium/adding-third-party-crates/downloading-crates.md:20 +#, fuzzy msgid "Direct and transitive dependencies" -msgstr "" +msgstr "Dependențe directe și tranzitive" -#: src/chromium/adding-third-party-crates/downloading-crates.md +#: src/chromium/adding-third-party-crates/downloading-crates.md:21 +#, fuzzy msgid "" "New versions of other crates, as required by `cargo` to resolve the complete " "set of crates required by Chromium." msgstr "" +"Versiuni noi ale altor crates, după cum este necesar pentru ca `cargo` să " +"rezolve setul complet de crates cerut de Chromium." -#: src/chromium/adding-third-party-crates/downloading-crates.md +#: src/chromium/adding-third-party-crates/downloading-crates.md:24 +#, fuzzy msgid "" "Chromium maintains patches for some crates, kept in `//third_party/rust/" "chromium_crates_io/patches`. These will be reapplied automatically, but if " "patching fails you may need to take manual action." msgstr "" +"Chromium menține patch-uri pentru unele crates, păstrate în `//third_party/" +"rust/chromium_crates_io/patches`. Acestea vor fi reaplicate în mod automat, " +"dar dacă patch-urile nu reușesc este posibil să fie nevoie să luați măsuri " +"manuale." -#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md +#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:3 +#, fuzzy msgid "" "Once you've downloaded the crate, generate the `BUILD.gn` files like this:" -msgstr "" +msgstr "După ce ați descărcat crate, generați fișierele `BUILD.gn` astfel:" -#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md +#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:9 +#, fuzzy msgid "Now run `git status`. You should find:" -msgstr "" +msgstr "Acum rulați `git status`. Ar trebui să găsiți:" -#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md +#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:11 +#, fuzzy msgid "" "At least one new crate source code in `third_party/rust/chromium_crates_io/" "vendor`" msgstr "" +"Cel puțin un nou cod sursă de crate în `third_party/rust/chromium_crates_io/" +"vendor`" -#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md +#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:13 +#, fuzzy msgid "" "At least one new `BUILD.gn` in `third_party/rust//v`" msgstr "" +"Cel puțin un nou `BUILD.gn` în `third_party/rust//v`" -#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md +#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:15 +#, fuzzy msgid "An appropriate `README.chromium`" -msgstr "" +msgstr "Un `README.chromium` adecvat" -#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md +#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:17 #, fuzzy msgid "" "The \"major semver version\" is a [Rust \"semver\" version number](https://" @@ -16041,89 +19207,138 @@ msgstr "" "A se vedea [Rust Reference](https://doc.rust-lang.org/reference/type-layout." "html)." -#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md +#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:19 +#, fuzzy msgid "" "Take a close look, especially at the things generated in `third_party/rust`." msgstr "" +"Uitați-vă cu atenție, în special la lucrurile generate în `third_party/rust`." -#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md +#: src/chromium/adding-third-party-crates/generating-gn-build-rules.md:23 +#, fuzzy msgid "" "Talk a little about semver --- and specifically the way that in Chromium " "it's to allow multiple incompatible versions of a crate, which is " "discouraged but sometimes necessary in the Cargo ecosystem." msgstr "" +"Vorbiți puțin despre semver --- și în special despre modul în care, în " +"Chromium, permite mai multe versiuni incompatibile ale unei cutii, ceea ce " +"este descurajat, dar uneori necesar în ecosistemul Cargo." -#: src/chromium/adding-third-party-crates/resolving-problems.md +#: src/chromium/adding-third-party-crates/resolving-problems.md:3 +#, fuzzy msgid "" "If your build fails, it may be because of a `build.rs`: programs which do " "arbitrary things at build time. This is fundamentally at odds with the " "design of `gn` and `ninja` which aim for static, deterministic, build rules " "to maximize parallelism and repeatability of builds." msgstr "" +"Dacă nu reușiți să construiți, este posibil să fie din cauza unui `build." +"rs`: programe care fac lucruri arbitrare în momentul construirii. Acest " +"lucru este în mod fundamental în contradicție cu proiectarea `gn` și " +"`ninja`, care vizează reguli de construire statice, deterministe, pentru a " +"maximiza paralelismul și repetabilitatea compilărilor." -#: src/chromium/adding-third-party-crates/resolving-problems.md +#: src/chromium/adding-third-party-crates/resolving-problems.md:8 +#, fuzzy msgid "" "Some `build.rs` actions are automatically supported; others require action:" msgstr "" +"Unele acțiuni `build.rs` sunt acceptate în mod automat; altele necesită o " +"acțiune:" -#: src/chromium/adding-third-party-crates/resolving-problems.md +#: src/chromium/adding-third-party-crates/resolving-problems.md:10 +#, fuzzy msgid "build script effect" -msgstr "" +msgstr "efect de script de construcție" -#: src/chromium/adding-third-party-crates/resolving-problems.md +#: src/chromium/adding-third-party-crates/resolving-problems.md:10 +#, fuzzy msgid "Supported by our gn templates" -msgstr "" +msgstr "Sprijinit de șabloanele noastre gn" -#: src/chromium/adding-third-party-crates/resolving-problems.md +#: src/chromium/adding-third-party-crates/resolving-problems.md:10 +#, fuzzy msgid "Work required by you" -msgstr "" +msgstr "Lucrări solicitate de dumneavoastră" -#: src/chromium/adding-third-party-crates/resolving-problems.md +#: src/chromium/adding-third-party-crates/resolving-problems.md:12 +#, fuzzy msgid "Checking rustc version to configure features on and off" msgstr "" +"Verificarea versiunii rustc pentru a configura funcțiile de activare și " +"dezactivare" + +#: src/chromium/adding-third-party-crates/resolving-problems.md:12 +#: src/chromium/adding-third-party-crates/resolving-problems.md:13 +#: src/chromium/adding-third-party-crates/resolving-problems.md:14 +msgid "Yes" +msgstr "Da" -#: src/chromium/adding-third-party-crates/resolving-problems.md +#: src/chromium/adding-third-party-crates/resolving-problems.md:12 +#: src/chromium/adding-third-party-crates/resolving-problems.md:13 msgid "None" -msgstr "" +msgstr "Nici unul" -#: src/chromium/adding-third-party-crates/resolving-problems.md +#: src/chromium/adding-third-party-crates/resolving-problems.md:13 +#, fuzzy msgid "Checking platform or CPU to configure features on and off" msgstr "" +"Verificarea platformei sau a unității centrale de procesare pentru a " +"configura funcțiile activate și dezactivate" -#: src/chromium/adding-third-party-crates/resolving-problems.md +#: src/chromium/adding-third-party-crates/resolving-problems.md:14 #, fuzzy msgid "Generating code" msgstr "Produse generice" -#: src/chromium/adding-third-party-crates/resolving-problems.md +#: src/chromium/adding-third-party-crates/resolving-problems.md:14 +#, fuzzy msgid "Yes - specify in `gnrt_config.toml`" -msgstr "" +msgstr "Da - specificați în `gnrt_config.toml`" -#: src/chromium/adding-third-party-crates/resolving-problems.md +#: src/chromium/adding-third-party-crates/resolving-problems.md:15 +#, fuzzy msgid "Building C/C++" -msgstr "" +msgstr "Construirea C/C++" -#: src/chromium/adding-third-party-crates/resolving-problems.md +#: src/chromium/adding-third-party-crates/resolving-problems.md:15 +#: src/chromium/adding-third-party-crates/resolving-problems.md:16 +msgid "No" +msgstr "Nu" + +#: src/chromium/adding-third-party-crates/resolving-problems.md:15 +#: src/chromium/adding-third-party-crates/resolving-problems.md:16 +#, fuzzy msgid "Patch around it" -msgstr "" +msgstr "Patch în jurul ei" -#: src/chromium/adding-third-party-crates/resolving-problems.md +#: src/chromium/adding-third-party-crates/resolving-problems.md:16 +#, fuzzy msgid "Arbitrary other actions" -msgstr "" +msgstr "Alte acțiuni arbitrare" -#: src/chromium/adding-third-party-crates/resolving-problems.md +#: src/chromium/adding-third-party-crates/resolving-problems.md:18 +#, fuzzy msgid "" "Fortunately, most crates don't contain a build script, and fortunately, most " "build scripts only do the top two actions." msgstr "" +"Din fericire, cele mai multe cratere nu conțin un script de construcție și, " +"din fericire, majoritatea scripturilor de construcție efectuează doar " +"primele două acțiuni." -#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md +#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md:3 +#, fuzzy msgid "" "If `ninja` complains about missing files, check the `build.rs` to see if it " "writes source code files." msgstr "" +"Dacă `ninja` se plânge că lipsesc fișiere, verificați `build.rs` pentru a " +"vedea dacă scrie fișiere de cod sursă." -#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md +#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md:6 +#, fuzzy msgid "" "If so, modify [`gnrt_config.toml`](../configuring-gnrt-config-toml.md) to " "add `build-script-outputs` to the crate. If this is a transitive dependency, " @@ -16131,8 +19346,14 @@ msgid "" "`allow-first-party-usage=false`. There are several examples already in that " "file:" msgstr "" +"În acest caz, modificați [`gnrt_config_config.toml`](../configuring-gnrt-" +"config-toml.md) pentru a adăuga `build-script-outputs` la crate. Dacă " +"aceasta este o dependență tranzitivă, adică una de care codul Chromium nu ar " +"trebui să depindă direct, adăugați și `allow-first-party-usage=false`. " +"Există deja câteva exemple în acel fișier:" -#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md +#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md:11 +#, fuzzy msgid "" "```toml\n" "[crate.unicode-linebreak]\n" @@ -16140,15 +19361,25 @@ msgid "" "build-script-outputs = [\"tables.rs\"]\n" "```" msgstr "" +"```toml\n" +"[crate.unicode-linebreak]\n" +"allow-first-party-usage = false\n" +"build-script-outputs = [\"tables.rs\"]\n" +"```" -#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md +#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md:17 +#, fuzzy msgid "" "Now rerun [`gnrt.py -- gen`](../generating-gn-build-rules.md) to regenerate " "`BUILD.gn` files to inform ninja that this particular output file is input " "to subsequent build steps." msgstr "" +"Acum rulați din nou [`gnrt.py -- gen`](../generating-gn-gn-build-rules.md) " +"pentru a regenera fișierele `BUILD.gn` pentru a informa ninja că acest " +"fișier de ieșire este o intrare pentru etapele ulterioare de construire." -#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md +#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md:3 +#, fuzzy msgid "" "Some crates use the [`cc`](https://crates.io/crates/cc) crate to build and " "link C/C++ libraries. Other crates parse C/C++ using [`bindgen`](https://" @@ -16156,20 +19387,30 @@ msgid "" "supported in a Chromium context --- our gn, ninja and LLVM build system is " "very specific in expressing relationships between build actions." msgstr "" +"Unele crates utilizează crate-ul [`cc`](https://crates.io/crates/cc) pentru " +"a construi și lega bibliotecile C/C++. Alte crates analizează C/C++ folosind " +"[`bindgen`](https://crates.io/crates/bindgen) în scripturile lor de " +"compilare. Aceste acțiuni nu pot fi suportate în contextul Chromium --- " +"sistemul nostru de compilare gn, ninja și LLVM este foarte specific în " +"exprimarea relațiilor dintre acțiunile de compilare." -#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md +#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md:8 +#, fuzzy msgid "So, your options are:" -msgstr "" +msgstr "Deci, opțiunile tale sunt:" -#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md +#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md:10 +#, fuzzy msgid "Avoid these crates" -msgstr "" +msgstr "Evitați aceste lăzi" -#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md +#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md:11 +#, fuzzy msgid "Apply a patch to the crate." -msgstr "" +msgstr "Aplicați un plasture pe ladă." -#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md +#: src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md:13 +#, fuzzy msgid "" "Patches should be kept in `third_party/rust/chromium_crates_io/patches/" "` - see for example the [patches against the `cxx` crate](https://" @@ -16177,20 +19418,31 @@ msgid "" "chromium_crates_io/patches/cxx/) - and will be applied automatically by " "`gnrt` each time it upgrades the crate." msgstr "" +"Patch-urile ar trebui păstrate în `third_party/rust/chromium_crates_io/" +"patches/` - a se vedea, de exemplu, [patches against the `cxx` crate]" +"(https://source.chromium.org/chromium/chromium/src/+/main:third_party/rust/" +"chromium_crates_io/patches/cxx/) - și vor fi aplicate automat de către " +"`gnrt` de fiecare dată când actualizează crate-ul." -#: src/chromium/adding-third-party-crates/depending-on-a-crate.md +#: src/chromium/adding-third-party-crates/depending-on-a-crate.md:3 +#, fuzzy msgid "" "Once you've added a third-party crate and generated build rules, depending " "on a crate is simple. Find your `rust_static_library` target, and add a " "`dep` on the `:lib` target within your crate." msgstr "" +"Odată ce ați adăugat o casetă terță parte și ați generat reguli de " +"construcție, este simplu să depindeți de o casetă. Găsiți ținta " +"`rust_static_library` și adăugați un `dep` pe ținta `:lib` în cadrul crate-" +"ului dumneavoastră." -#: src/chromium/adding-third-party-crates/depending-on-a-crate.md +#: src/chromium/adding-third-party-crates/depending-on-a-crate.md:7 #, fuzzy msgid "Specifically," msgstr "Specific sistemului de operare" -#: src/chromium/adding-third-party-crates/depending-on-a-crate.md +#: src/chromium/adding-third-party-crates/depending-on-a-crate.md:9 +#, fuzzy msgid "" "```bob\n" " +------------+ +----------------------+\n" @@ -16199,8 +19451,15 @@ msgid "" " +------------+ +----------------------+\n" "```" msgstr "" +"```bob\n" +" +------------+ +----------------------+\n" +"\"//third_party/rust\" | nume ladă | \"/v\" | versiunea majoră a semver | \":" +"lib\"\n" +" +------------+ +----------------------+\n" +"```" -#: src/chromium/adding-third-party-crates/depending-on-a-crate.md +#: src/chromium/adding-third-party-crates/depending-on-a-crate.md:17 +#, fuzzy msgid "" "```gn\n" "rust_static_library(\"my_rust_lib\") {\n" @@ -16210,12 +19469,21 @@ msgid "" "}\n" "```" msgstr "" +"```gn\n" +"rust_static_library(\"my_rust_lib\") {\n" +" crate_root = \"lib.rs\"\n" +" sources = [ \"lib.rs\" ]\n" +" deps = [ \"//third_party/rust/example_rust_crate/v1:lib\" ]\n" +"}\n" +"```" -#: src/chromium/adding-third-party-crates/reviews-and-audits.md +#: src/chromium/adding-third-party-crates/reviews-and-audits.md:1 +#, fuzzy msgid "Auditing Third Party Crates" -msgstr "" +msgstr "Auditul caselor terților" -#: src/chromium/adding-third-party-crates/reviews-and-audits.md +#: src/chromium/adding-third-party-crates/reviews-and-audits.md:3 +#, fuzzy msgid "" "Adding new libraries is subject to Chromium's standard [policies](https://" "chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust." @@ -16224,105 +19492,163 @@ msgid "" "dependencies, there may be a lot of code to review. On the other hand, safe " "Rust code can have limited negative side effects. How should you review it?" msgstr "" +"Adăugarea de noi biblioteci este supusă [politicilor] standard ale Chromium " +"(https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust." +"md#Third_party-review), dar, bineînțeles, este supusă și unei revizuiri de " +"securitate. Deoarece este posibil să aduceți nu doar o singură crăiasă, ci " +"și dependențe tranzitive, este posibil să existe o mulțime de cod de " +"revizuit. Pe de altă parte, codul Rust sigur poate avea efecte secundare " +"negative limitate. Cum ar trebui să îl revizuiți?" -#: src/chromium/adding-third-party-crates/reviews-and-audits.md +#: src/chromium/adding-third-party-crates/reviews-and-audits.md:9 +#, fuzzy msgid "" "Over time Chromium aims to move to a process based around [cargo vet]" "(https://mozilla.github.io/cargo-vet/)." msgstr "" +"În timp, Chromium își propune să treacă la un proces bazat pe [cargo vet]" +"(https://mozilla.github.io/cargo-vet/)." -#: src/chromium/adding-third-party-crates/reviews-and-audits.md +#: src/chromium/adding-third-party-crates/reviews-and-audits.md:11 +#, fuzzy msgid "" "Meanwhile, for each new crate addition, we are checking for the following:" -msgstr "" +msgstr "Între timp, pentru fiecare nouă ladă adăugată, verificăm următoarele:" -#: src/chromium/adding-third-party-crates/reviews-and-audits.md +#: src/chromium/adding-third-party-crates/reviews-and-audits.md:13 +#, fuzzy msgid "" "Understand why each crate is used. What's the relationship between crates? " "If the build system for each crate contains a `build.rs` or procedural " "macros, work out what they're for. Are they compatible with the way Chromium " "is normally built?" msgstr "" +"Înțelegeți de ce este folosită fiecare ladă. Care este relația dintre lăzi? " +"Dacă sistemul de compilare pentru fiecare crate conține un `build.rs` sau " +"macroproceduri procedurale, încercați să aflați la ce folosesc. Sunt " +"compatibile cu modul în care Chromium este construit în mod normal?" -#: src/chromium/adding-third-party-crates/reviews-and-audits.md +#: src/chromium/adding-third-party-crates/reviews-and-audits.md:17 +#, fuzzy msgid "Check each crate seems to be reasonably well maintained" -msgstr "" +msgstr "Verificați dacă fiecare ladă pare a fi rezonabil de bine întreținută" -#: src/chromium/adding-third-party-crates/reviews-and-audits.md +#: src/chromium/adding-third-party-crates/reviews-and-audits.md:18 +#, fuzzy msgid "" "Use `cd third-party/rust/chromium_crates_io; cargo audit` to check for known " "vulnerabilities (first you'll need to `cargo install cargo-audit`, which " "ironically involves downloading lots of dependencies from the internet[2](../" "cargo.md))" msgstr "" +"Folosiți `cd third-party/rust/chromium_crates_io; cargo audit` pentru a " +"verifica vulnerabilitățile cunoscute (mai întâi va trebui să `cargo install " +"cargo-audit`, care, în mod ironic, implică descărcarea multor dependențe de " +"pe internet[2](../cargo.md)))" -#: src/chromium/adding-third-party-crates/reviews-and-audits.md +#: src/chromium/adding-third-party-crates/reviews-and-audits.md:21 +#, fuzzy msgid "" "Ensure any `unsafe` code is good enough for the [Rule of Two](https://" "chromium.googlesource.com/chromium/src/+/main/docs/security/rule-of-2." "md#unsafe-code-in-safe-languages)" msgstr "" +"Asigurați-vă că orice cod `unsafe` este suficient de bun pentru [Rule of Two]" +"(https://chromium.googlesource.com/chromium/src/+/main/docs/security/rule-" +"of-2.md#unsafe-code-in-safe-languages)" -#: src/chromium/adding-third-party-crates/reviews-and-audits.md +#: src/chromium/adding-third-party-crates/reviews-and-audits.md:22 +#, fuzzy msgid "Check for any use of `fs` or `net` APIs" -msgstr "" +msgstr "Verificați dacă se utilizează API-urile `fs` sau `net`" -#: src/chromium/adding-third-party-crates/reviews-and-audits.md +#: src/chromium/adding-third-party-crates/reviews-and-audits.md:23 +#, fuzzy msgid "" "Read all the code at a sufficient level to look for anything out of place " "that might have been maliciously inserted. (You can't realistically aim for " "100% perfection here: there's often just too much code.)" msgstr "" +"Citiți tot codul la un nivel suficient pentru a căuta orice lucru care nu " +"este la locul lui și care ar fi putut fi introdus în mod rău intenționat. " +"(În mod realist, nu puteți urmări 100% perfecțiune aici: de multe ori este " +"prea mult cod)" -#: src/chromium/adding-third-party-crates/reviews-and-audits.md +#: src/chromium/adding-third-party-crates/reviews-and-audits.md:27 +#, fuzzy msgid "" "These are just guidelines --- work with reviewers from `security@chromium." "org` to work out the right way to become confident of the crate." msgstr "" +"Acestea sunt doar linii directoare --- lucrați cu recenzenții de la " +"`security@chromium.org` pentru a găsi modul corect de a deveni încrezător în " +"ladă." -#: src/chromium/adding-third-party-crates/checking-in.md +#: src/chromium/adding-third-party-crates/checking-in.md:1 +#, fuzzy msgid "Checking Crates into Chromium Source Code" -msgstr "" +msgstr "Verificarea Crates în codul sursă Chromium" -#: src/chromium/adding-third-party-crates/checking-in.md +#: src/chromium/adding-third-party-crates/checking-in.md:3 +#, fuzzy msgid "`git status` should reveal:" -msgstr "" +msgstr "`git status` ar trebui să arate:" -#: src/chromium/adding-third-party-crates/checking-in.md +#: src/chromium/adding-third-party-crates/checking-in.md:5 +#, fuzzy msgid "Crate code in `//third_party/rust/chromium_crates_io`" -msgstr "" +msgstr "Cod de crăiță în `//third_party/rust/chromium_crates_io`" -#: src/chromium/adding-third-party-crates/checking-in.md +#: src/chromium/adding-third-party-crates/checking-in.md:6 +#, fuzzy msgid "" "Metadata (`BUILD.gn` and `README.chromium`) in `//third_party/rust//" "`" msgstr "" +"Metadate (`BUILD.gn` și `README.chromium`) în `//third_party/rust//" +"`" -#: src/chromium/adding-third-party-crates/checking-in.md +#: src/chromium/adding-third-party-crates/checking-in.md:9 +#, fuzzy msgid "Please also add an `OWNERS` file in the latter location." msgstr "" +"Vă rugăm să adăugați, de asemenea, un fișier `OWNERS` în această din urmă " +"locație." -#: src/chromium/adding-third-party-crates/checking-in.md +#: src/chromium/adding-third-party-crates/checking-in.md:11 +#, fuzzy msgid "" "You should land all this, along with your `Cargo.toml` and `gnrt_config." "toml` changes, into the Chromium repo." msgstr "" +"Ar trebui să transferați toate acestea, împreună cu modificările `Cargo." +"toml` și `gnrt_config.toml`, în repo-ul Chromium." -#: src/chromium/adding-third-party-crates/checking-in.md +#: src/chromium/adding-third-party-crates/checking-in.md:14 +#, fuzzy msgid "" "**Important**: you need to use `git add -f` because otherwise `.gitignore` " "files may result in some files being skipped." msgstr "" +"**Important**: trebuie să folosiți `git add -f` pentru că altfel fișierele `." +"gitignore` pot duce la omiterea unor fișiere." -#: src/chromium/adding-third-party-crates/checking-in.md +#: src/chromium/adding-third-party-crates/checking-in.md:17 +#, fuzzy msgid "" "As you do so, you might find presubmit checks fail because of non-inclusive " "language. This is because Rust crate data tends to include names of git " "branches, and many projects still use non-inclusive terminology there. So " "you may need to run:" msgstr "" +"Pe măsură ce faceți acest lucru, s-ar putea să constatați că verificările " +"înainte de trimitere eșuează din cauza limbajului neincluziv. Acest lucru se " +"datorează faptului că datele din Rust crate tind să includă nume de ramuri " +"git, iar multe proiecte încă folosesc terminologia neinclusivă acolo. " +"Așadar, este posibil să fie nevoie să rulați:" -#: src/chromium/adding-third-party-crates/keeping-up-to-date.md +#: src/chromium/adding-third-party-crates/keeping-up-to-date.md:3 +#, fuzzy msgid "" "As the OWNER of any third party Chromium dependency, you are [expected to " "keep it up to date with any security fixes](https://chromium.googlesource." @@ -16330,146 +19656,213 @@ msgid "" "hoped that we will soon automate this for Rust crates, but for now, it's " "still your responsibility just as it is for any other third party dependency." msgstr "" +"În calitate de PROPRIETAR al oricărei dependențe de Chromium de la terți, " +"trebuie [să o mențineți la zi cu toate corecturile de securitate] (https://" +"chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party." +"md#add-owners). Se speră că în curând vom automatiza acest lucru pentru Rust " +"crates, dar, deocamdată, este în continuare responsabilitatea dvs. la fel ca " +"pentru orice altă dependență terță parte." -#: src/exercises/chromium/third-party.md +#: src/exercises/chromium/third-party.md:3 +#, fuzzy msgid "" "Add [uwuify](https://crates.io/crates/uwuify) to Chromium, turning off the " "crate's [default features](https://doc.rust-lang.org/cargo/reference/" "features.html#the-default-feature). Assume that the crate will be used in " "shipping Chromium, but won't be used to handle untrustworthy input." msgstr "" +"Adăugați [uwuify](https://crates.io/crates/uwuify) la Chromium, dezactivând " +"[caracteristici implicite](https://doc.rust-lang.org/cargo/reference/" +"features.html#the-default-feature). Presupuneți că crate-ul va fi utilizat " +"în livrarea Chromium, dar nu va fi folosit pentru a gestiona intrările " +"nesigure." -#: src/exercises/chromium/third-party.md +#: src/exercises/chromium/third-party.md:7 +#, fuzzy msgid "" "(In the next exercise we'll use uwuify from Chromium, but feel free to skip " "ahead and do that now if you like. Or, you could create a new " "[`rust_executable` target](https://source.chromium.org/chromium/chromium/src/" "+/main:build/rust/rust_executable.gni) which uses `uwuify`)." msgstr "" +"(În următorul exercițiu vom folosi uwuify din Chromium, dar nu ezitați să " +"treceți peste și să faceți asta acum dacă doriți. Sau, puteți crea o nouă " +"țintă [`rust_executable`](https://source.chromium.org/chromium/chromium/src/" +"+/main:build/rust/rust_executable.gni) care utilizează `uwuify`)." -#: src/exercises/chromium/third-party.md +#: src/exercises/chromium/third-party.md:13 +#, fuzzy msgid "Students will need to download lots of transitive dependencies." -msgstr "" +msgstr "Elevii vor trebui să descarce o mulțime de dependențe tranzitive." -#: src/exercises/chromium/third-party.md +#: src/exercises/chromium/third-party.md:15 +#, fuzzy msgid "The total crates needed are:" -msgstr "" +msgstr "Numărul total de lăzi necesare este:" -#: src/exercises/chromium/third-party.md +#: src/exercises/chromium/third-party.md:17 #, fuzzy msgid "`instant`," msgstr "Constant" -#: src/exercises/chromium/third-party.md +#: src/exercises/chromium/third-party.md:18 +#, fuzzy msgid "`lock_api`," -msgstr "" +msgstr "`lock_api`," -#: src/exercises/chromium/third-party.md +#: src/exercises/chromium/third-party.md:19 +#, fuzzy msgid "`parking_lot`," -msgstr "" +msgstr "`parking_lot`," -#: src/exercises/chromium/third-party.md +#: src/exercises/chromium/third-party.md:20 +#, fuzzy msgid "`parking_lot_core`," -msgstr "" +msgstr "`parking_lot_core`," -#: src/exercises/chromium/third-party.md +#: src/exercises/chromium/third-party.md:21 +#, fuzzy msgid "`redox_syscall`," -msgstr "" +msgstr "`redox_syscall`," -#: src/exercises/chromium/third-party.md +#: src/exercises/chromium/third-party.md:22 +#, fuzzy msgid "`scopeguard`," -msgstr "" +msgstr "`scopeguard`," -#: src/exercises/chromium/third-party.md +#: src/exercises/chromium/third-party.md:23 +#, fuzzy msgid "`smallvec`, and" -msgstr "" +msgstr "`smallvec`, și" -#: src/exercises/chromium/third-party.md +#: src/exercises/chromium/third-party.md:24 +#, fuzzy msgid "`uwuify`." -msgstr "" +msgstr "`uwuify`." -#: src/exercises/chromium/third-party.md +#: src/exercises/chromium/third-party.md:26 +#, fuzzy msgid "" "If students are downloading even more than that, they probably forgot to " "turn off the default features." msgstr "" +"Dacă elevii descarcă chiar mai mult decât atât, probabil că au uitat să " +"dezactiveze funcțiile implicite." -#: src/exercises/chromium/third-party.md +#: src/exercises/chromium/third-party.md:29 +#, fuzzy msgid "" "Thanks to [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) for this crate!" msgstr "" +"Mulțumim lui [Daniel Liu](https://github.com/Daniel-Liu-c0deb0t) pentru " +"această ladă!" -#: src/exercises/chromium/bringing-it-together.md +#: src/exercises/chromium/bringing-it-together.md:1 +#, fuzzy msgid "Bringing It Together --- Exercise" -msgstr "" +msgstr "Reunind totul - Exercițiu" -#: src/exercises/chromium/bringing-it-together.md +#: src/exercises/chromium/bringing-it-together.md:3 +#, fuzzy msgid "" "In this exercise, you're going to add a whole new Chromium feature, bringing " "together everything you already learned." msgstr "" +"În acest exercițiu, veți adăuga o funcție Chromium complet nouă, reunind tot " +"ceea ce ați învățat deja." -#: src/exercises/chromium/bringing-it-together.md +#: src/exercises/chromium/bringing-it-together.md:6 +#, fuzzy msgid "The Brief from Product Management" -msgstr "" +msgstr "Informarea din partea managementului de produs" -#: src/exercises/chromium/bringing-it-together.md +#: src/exercises/chromium/bringing-it-together.md:8 +#, fuzzy msgid "" "A community of pixies has been discovered living in a remote rainforest. " "It's important that we get Chromium for Pixies delivered to them as soon as " "possible." msgstr "" +"A fost descoperită o comunitate de zâne care trăiește într-o pădure " +"tropicală izolată. Este important să le livrăm Chromium pentru Pixies cât " +"mai curând posibil." -#: src/exercises/chromium/bringing-it-together.md +#: src/exercises/chromium/bringing-it-together.md:11 +#, fuzzy msgid "" "The requirement is to translate all Chromium's UI strings into Pixie " "language." msgstr "" +"Cerința este de a traduce toate șirurile interfeței de utilizare a Chromium " +"în limbajul Pixie." -#: src/exercises/chromium/bringing-it-together.md +#: src/exercises/chromium/bringing-it-together.md:13 +#, fuzzy msgid "" "There's not time to wait for proper translations, but fortunately pixie " "language is very close to English, and it turns out there's a Rust crate " "which does the translation." msgstr "" +"Nu avem timp să așteptăm traduceri adecvate, dar din fericire, limba pixie " +"este foarte apropiată de limba engleză și se pare că există o casetă Rust " +"care face traducerea." -#: src/exercises/chromium/bringing-it-together.md +#: src/exercises/chromium/bringing-it-together.md:17 +#, fuzzy msgid "" "In fact, you already [imported that crate in the previous exercise](https://" "crates.io/crates/uwuify)." msgstr "" +"De fapt, ați [importat deja acea ladă în exercițiul anterior](https://crates." +"io/crates/uwuify)." -#: src/exercises/chromium/bringing-it-together.md +#: src/exercises/chromium/bringing-it-together.md:19 +#, fuzzy msgid "" "(Obviously, real translations of Chrome require incredible care and " "diligence. Don't ship this!)" msgstr "" +"(Evident, traducerile reale ale lui Chrome necesită o atenție și o diligență " +"incredibile. Nu expediați asta!)" -#: src/exercises/chromium/bringing-it-together.md +#: src/exercises/chromium/bringing-it-together.md:22 msgid "Steps" -msgstr "" +msgstr "Pași" -#: src/exercises/chromium/bringing-it-together.md +#: src/exercises/chromium/bringing-it-together.md:24 +#, fuzzy msgid "" "Modify `ResourceBundle::MaybeMangleLocalizedString` so that it uwuifies all " "strings before display. In this special build of Chromium, it should always " "do this irrespective of the setting of `mangle_localized_strings_`." msgstr "" +"Modifică `ResourceBundle::MaybeMangleLocalizedString` astfel încât să " +"uwuifice toate șirurile înainte de afișare. În această versiune specială a " +"Chromium, ar trebui să facă întotdeauna acest lucru indiferent de setarea " +"lui `mangle_localized_strings_`." -#: src/exercises/chromium/bringing-it-together.md +#: src/exercises/chromium/bringing-it-together.md:28 +#, fuzzy msgid "" "If you've done everything right across all these exercises, congratulations, " "you should have created Chrome for pixies!" msgstr "" +"Dacă ai făcut totul bine în toate aceste exerciții, felicitări, ar trebui să " +"creezi Chrome pentru pixeli!" -#: src/exercises/chromium/bringing-it-together.md +#: src/exercises/chromium/bringing-it-together.md:36 +#, fuzzy msgid "" "UTF16 vs UTF8. Students should be aware that Rust strings are always UTF8, " "and will probably decide that it's better to do the conversion on the C++ " "side using `base::UTF16ToUTF8` and back again." msgstr "" +"UTF16 vs UTF8. Studenții ar trebui să fie conștienți de faptul că șirurile " +"de caractere Rust sunt întotdeauna UTF8 și probabil vor decide că este mai " +"bine să facă conversia pe partea C++ folosind `base::UTF16ToUTF8` și invers." -#: src/exercises/chromium/bringing-it-together.md +#: src/exercises/chromium/bringing-it-together.md:39 +#, fuzzy msgid "" "If students decide to do the conversion on the Rust side, they'll need to " "consider [`String::from_utf16`](https://doc.rust-lang.org/std/string/struct." @@ -16477,8 +19870,14 @@ msgid "" "[CXX supported types can transfer a lot of u16s](https://cxx.rs/binding/" "slice.html)." msgstr "" +"Dacă studenții decid să facă conversia pe partea Rust, ei vor trebui să ia " +"în considerare [`String::from_utf16`](https://doc.rust-lang.org/std/string/" +"struct.String.html#method.from_utf16), să ia în considerare gestionarea " +"erorilor și să ia în considerare care dintre tipurile acceptate de [CXX pot " +"transfera o mulțime de u16s](https://cxx.rs/binding/slice.html)." -#: src/exercises/chromium/bringing-it-together.md +#: src/exercises/chromium/bringing-it-together.md:42 +#, fuzzy msgid "" "Students may design the C++/Rust boundary in several different ways, e.g. " "taking and returning strings by value, or taking a mutable reference to a " @@ -16488,32 +19887,51 @@ msgid "" "mutable references to C++ data: the answer is that C++ data can't be moved " "around like Rust data, because it may contain self-referential pointers." msgstr "" +"Elevii pot proiecta granița C++/Rust în mai multe moduri diferite, de " +"exemplu, preluarea și returnarea șirurilor de caractere prin valoare sau " +"preluarea unei referințe mutabile la un șir de caractere. În cazul în care " +"se utilizează o referință mutabilă, CXX îi va spune probabil elevului că " +"trebuie să utilizeze [`Pin`](https://doc.rust-lang.org/std/pin/). Este " +"posibil să fie necesar să explicați ce face `Pin` și apoi să explicați de ce " +"CXX are nevoie de el pentru referințele mutabile la datele C++: răspunsul " +"este că datele C++ nu pot fi mutate ca datele Rust, deoarece pot conține " +"pointeri autoreferențiali." -#: src/exercises/chromium/bringing-it-together.md +#: src/exercises/chromium/bringing-it-together.md:49 +#, fuzzy msgid "" "The C++ target containing `ResourceBundle::MaybeMangleLocalizedString` will " "need to depend on a `rust_static_library` target. The student probably " "already did this." msgstr "" +"Ținta C++ care conține `ResourceBundle::MaybeMangleLocalizedString` va " +"trebui să depindă de o țintă `rust_static_library`. Probabil că studentul a " +"făcut deja acest lucru." -#: src/exercises/chromium/bringing-it-together.md +#: src/exercises/chromium/bringing-it-together.md:52 +#, fuzzy msgid "" "The `rust_static_library` target will need to depend on `//third_party/rust/" "uwuify/v0_2:lib`." msgstr "" +"Ținta `rust_static_library` va trebui să depindă de `//third_party/rust/" +"uwuify/v0_2:lib`." -#: src/exercises/chromium/solutions.md +#: src/exercises/chromium/solutions.md:3 +#, fuzzy msgid "" "Solutions to the Chromium exercises can be found in [this series of CLs]" "(https://chromium-review.googlesource.com/c/chromium/src/+/5096560)." msgstr "" +"Soluțiile la exercițiile cu Chromium se găsesc în [această serie de CL]" +"(https://chromium-review.googlesource.com/c/chromium/src/+/5096560)." -#: src/bare-metal.md +#: src/bare-metal.md:1 #, fuzzy msgid "Welcome to Bare Metal Rust" msgstr "Bine ați venit la Bare Metal Rust" -#: src/bare-metal.md +#: src/bare-metal.md:3 #, fuzzy msgid "" "This is a standalone one-day course about bare-metal Rust, aimed at people " @@ -16526,7 +19944,7 @@ msgstr "" "urma absolvirii cursului Comprehensive Rust) și care, în mod ideal, au și o " "anumită experiență în programarea bare-metal într-un alt limbaj, cum ar fi C." -#: src/bare-metal.md +#: src/bare-metal.md:8 #, fuzzy msgid "" "Today we will talk about 'bare-metal' Rust: running Rust code without an OS " @@ -16535,27 +19953,27 @@ msgstr "" "Astăzi vom vorbi despre Rust \"bare-metal\": rularea codului Rust fără un " "sistem de operare sub noi. Acest subiect va fi împărțit în mai multe părți:" -#: src/bare-metal.md +#: src/bare-metal.md:11 #, fuzzy msgid "What is `no_std` Rust?" msgstr "Ce este `no_std` Rust?" -#: src/bare-metal.md +#: src/bare-metal.md:12 #, fuzzy msgid "Writing firmware for microcontrollers." msgstr "Scrierea de firmware pentru microcontrolere." -#: src/bare-metal.md +#: src/bare-metal.md:13 #, fuzzy msgid "Writing bootloader / kernel code for application processors." msgstr "Scrierea codului bootloader / kernel pentru procesoarele de aplicații." -#: src/bare-metal.md +#: src/bare-metal.md:14 #, fuzzy msgid "Some useful crates for bare-metal Rust development." msgstr "Câteva lădițe utile pentru dezvoltarea Rust pe suport metalic gol." -#: src/bare-metal.md +#: src/bare-metal.md:16 #, fuzzy msgid "" "For the microcontroller part of the course we will use the [BBC micro:bit]" @@ -16570,7 +19988,7 @@ msgstr "" "câteva LED-uri și butoane, un accelerometru și o busolă conectate I2C și un " "depanator SWD la bord." -#: src/bare-metal.md +#: src/bare-metal.md:22 #, fuzzy msgid "" "To get started, install some tools we'll need later. On gLinux or Debian:" @@ -16578,7 +19996,7 @@ msgstr "" "Pentru a începe, instalați câteva instrumente de care vom avea nevoie mai " "târziu. Pe gLinux sau Debian:" -#: src/bare-metal.md +#: src/bare-metal.md:34 #, fuzzy msgid "" "And give users in the `plugdev` group access to the micro:bit programmer:" @@ -16586,159 +20004,159 @@ msgstr "" "Și oferiți utilizatorilor din grupul `plugdev` acces la programatorul micro:" "bit:" -#: src/bare-metal.md src/bare-metal/microcontrollers/debugging.md +#: src/bare-metal.md:44 src/bare-metal/microcontrollers/debugging.md:33 #, fuzzy msgid "On MacOS:" msgstr "Pe MacOS:" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:7 #, fuzzy msgid "`core`" msgstr "`core`" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:17 #, fuzzy msgid "`std`" -msgstr "`std`" +msgstr "no_std" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:24 #, fuzzy msgid "Slices, `&str`, `CStr`" msgstr "Slices, `&str`, `CStr`" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:25 #, fuzzy msgid "`NonZeroU8`..." msgstr "`NonZeroU8`..." -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:26 #, fuzzy msgid "`Option`, `Result`" msgstr "`Opțiune`, `Rezultat`" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:27 #, fuzzy msgid "`Display`, `Debug`, `write!`..." msgstr "`Display`, `Debug`, `write!`..." -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:29 #, fuzzy msgid "`panic!`, `assert_eq!`..." msgstr "`panic!`, `assert_eq!`..." -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:30 #, fuzzy msgid "`NonNull` and all the usual pointer-related functions" msgstr "`NonNull` și toate funcțiile obișnuite legate de pointer" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:31 #, fuzzy msgid "`Future` and `async`/`await`" msgstr "`Future` și `async`/`await`" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:32 #, fuzzy msgid "`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`..." msgstr "`fence`, `AtomicBool`, `AtomicPtr`, `AtomicU32`..." -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:33 #, fuzzy msgid "`Duration`" msgstr "`Durată`" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:38 #, fuzzy msgid "`Box`, `Cow`, `Arc`, `Rc`" msgstr "`Box`, `Cow`, `Arc`, `Rc`" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:39 #, fuzzy msgid "`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`" msgstr "`Vec`, `BinaryHeap`, `BtreeMap`, `LinkedList`, `VecDeque`" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:40 #, fuzzy msgid "`String`, `CString`, `format!`" msgstr "`String`, `CString`, `format!`" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:45 #, fuzzy msgid "`Error`" -msgstr "`Error`" +msgstr "[Gestionarea erorilor](../error-handling.md) (45 minute)" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:47 #, fuzzy msgid "`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`" msgstr "`Mutex`, `Condvar`, `Barrier`, `Once`, `RwLock`, `mpsc`" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:48 #, fuzzy msgid "`File` and the rest of `fs`" msgstr "`File` și restul de `fs`" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:49 #, fuzzy msgid "`println!`, `Read`, `Write`, `Stdin`, `Stdout` and the rest of `io`" msgstr "`println!`, `Read`, `Write`, `Stdin`, `Stdout` și restul de `io`" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:50 #, fuzzy msgid "`Path`, `OsString`" msgstr "`Path`, `OsString`" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:51 #, fuzzy msgid "`net`" msgstr "`net`" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:52 #, fuzzy msgid "`Command`, `Child`, `ExitCode`" msgstr "`Command`, `Child`, `ExitCode`" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:53 #, fuzzy msgid "`spawn`, `sleep` and the rest of `thread`" msgstr "`spawn`, `sleep` și restul de `thread`" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:54 #, fuzzy msgid "`SystemTime`, `Instant`" msgstr "`SystemTime`, `Instant`" -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:62 #, fuzzy msgid "`HashMap` depends on RNG." msgstr "`HashMap` depinde de RNG." -#: src/bare-metal/no_std.md +#: src/bare-metal/no_std.md:63 #, fuzzy msgid "`std` re-exports the contents of both `core` and `alloc`." msgstr "`std` reexportă conținutul atât al lui `core` cât și al lui `alloc`." -#: src/bare-metal/minimal.md +#: src/bare-metal/minimal.md:1 #, fuzzy msgid "A minimal `no_std` program" msgstr "Un program minimal `no_std`" -#: src/bare-metal/minimal.md +#: src/bare-metal/minimal.md:19 #, fuzzy msgid "This will compile to an empty binary." msgstr "Aceasta va compila un binar gol." -#: src/bare-metal/minimal.md +#: src/bare-metal/minimal.md:20 #, fuzzy msgid "`std` provides a panic handler; without it we must provide our own." msgstr "" "`std` oferă un gestionar de panică; în lipsa acestuia, trebuie să ne " "furnizăm propriul gestionar." -#: src/bare-metal/minimal.md +#: src/bare-metal/minimal.md:21 #, fuzzy msgid "It can also be provided by another crate, such as `panic-halt`." msgstr "Acesta poate fi furnizat și de o altă ladă, cum ar fi `panic-halt`." -#: src/bare-metal/minimal.md +#: src/bare-metal/minimal.md:22 #, fuzzy msgid "" "Depending on the target, you may need to compile with `panic = \"abort\"` to " @@ -16747,7 +20165,7 @@ msgstr "" "În funcție de țintă, este posibil să fie nevoie să compilați cu `panic = " "\"abort\"` pentru a evita o eroare cu privire la `eh_personality`." -#: src/bare-metal/minimal.md +#: src/bare-metal/minimal.md:24 #, fuzzy msgid "" "Note that there is no `main` or any other entry point; it's up to you to " @@ -16759,7 +20177,7 @@ msgstr "" "implica, de obicei, un script de linker și ceva cod de asamblare pentru a " "pregăti lucrurile pentru a permite rularea codului Rust." -#: src/bare-metal/alloc.md +#: src/bare-metal/alloc.md:3 #, fuzzy msgid "" "To use `alloc` you must implement a [global (heap) allocator](https://doc." @@ -16768,25 +20186,30 @@ msgstr "" "Pentru a utiliza `alloc` trebuie să implementați un [alocator global (heap)]" "(https://doc.rust-lang.org/stable/std/alloc/trait.GlobalAlloc.html)." -#: src/bare-metal/alloc.md +#: src/bare-metal/alloc.md:23 +#, fuzzy msgid "" "// Safe because `HEAP` is only used here and `entry` is only called once.\n" msgstr "" +"// Sigur, deoarece `HEAP` este folosit doar aici și `entry` este apelat doar " +"o singură dată.\n" -#: src/bare-metal/alloc.md +#: src/bare-metal/alloc.md:25 +#, fuzzy msgid "// Give the allocator some memory to allocate.\n" -msgstr "" +msgstr "// Dați alocatorului o anumită memorie de alocat.\n" -#: src/bare-metal/alloc.md +#: src/bare-metal/alloc.md:29 +#, fuzzy msgid "// Now we can do things that require heap allocation.\n" -msgstr "" +msgstr "// Acum putem face lucruri care necesită alocare de heap.\n" -#: src/bare-metal/alloc.md +#: src/bare-metal/alloc.md:31 #, fuzzy msgid "\"A string\"" -msgstr "șir:" +msgstr "Șir" -#: src/bare-metal/alloc.md +#: src/bare-metal/alloc.md:37 #, fuzzy msgid "" "`buddy_system_allocator` is a third-party crate implementing a basic buddy " @@ -16798,7 +20221,7 @@ msgstr "" "puteți să vă scrieți propriul alocator sau să vă conectați la alocatorul " "existent." -#: src/bare-metal/alloc.md +#: src/bare-metal/alloc.md:40 #, fuzzy msgid "" "The const parameter of `LockedHeap` is the max order of the allocator; i.e. " @@ -16807,7 +20230,7 @@ msgstr "" "Parametrul const al `LockedHeap` este ordinea maximă a alocatorului; adică, " "în acest caz, acesta poate aloca regiuni de până la 2\\*\\*32 octeți." -#: src/bare-metal/alloc.md +#: src/bare-metal/alloc.md:42 #, fuzzy msgid "" "If any crate in your dependency tree depends on `alloc` then you must have " @@ -16818,7 +20241,7 @@ msgstr "" "trebuie să aveți exact un alocator global definit în binarul dumneavoastră. " "De obicei, acest lucru se face în crate-ul binar de nivel superior." -#: src/bare-metal/alloc.md +#: src/bare-metal/alloc.md:45 #, fuzzy msgid "" "`extern crate panic_halt as _` is necessary to ensure that the `panic_halt` " @@ -16828,14 +20251,14 @@ msgstr "" "`panic_halt` este legat, astfel încât să obținem gestionarul de panică al " "acestuia." -#: src/bare-metal/alloc.md +#: src/bare-metal/alloc.md:47 #, fuzzy msgid "This example will build but not run, as it doesn't have an entry point." msgstr "" "Acest exemplu va fi construit, dar nu va fi executat, deoarece nu are un " "punct de intrare." -#: src/bare-metal/microcontrollers.md +#: src/bare-metal/microcontrollers.md:3 #, fuzzy msgid "" "The `cortex_m_rt` crate provides (among other things) a reset handler for " @@ -16844,7 +20267,7 @@ msgstr "" "Crate `cortex_m_rt` oferă (printre altele) un gestionar de resetare pentru " "microcontrolerele Cortex M." -#: src/bare-metal/microcontrollers.md +#: src/bare-metal/microcontrollers.md:24 #, fuzzy msgid "" "Next we'll look at how to access peripherals, with increasing levels of " @@ -16853,7 +20276,7 @@ msgstr "" "În continuare, vom examina modul de accesare a perifericelor, cu niveluri de " "abstractizare din ce în ce mai mari." -#: src/bare-metal/microcontrollers.md +#: src/bare-metal/microcontrollers.md:29 #, fuzzy msgid "" "The `cortex_m_rt::entry` macro requires that the function have type `fn() -" @@ -16862,12 +20285,12 @@ msgstr "" "Macroul `cortex_m_rt::entry` necesită ca funcția să aibă tipul `fn() -> !`, " "deoarece întoarcerea la gestionarul de resetare nu are sens." -#: src/bare-metal/microcontrollers.md +#: src/bare-metal/microcontrollers.md:31 #, fuzzy msgid "Run the example with `cargo embed --bin minimal`" msgstr "Rulați exemplul cu `cargo embed --bin minimal`" -#: src/bare-metal/microcontrollers/mmio.md +#: src/bare-metal/microcontrollers/mmio.md:3 #, fuzzy msgid "" "Most microcontrollers access peripherals via memory-mapped IO. Let's try " @@ -16876,37 +20299,49 @@ msgstr "" "Majoritatea microcontrolerelor accesează perifericele prin intermediul IO " "mapate în memorie. Să încercăm să aprindem un LED pe micro:bit-ul nostru:" -#: src/bare-metal/microcontrollers/mmio.md +#: src/bare-metal/microcontrollers/mmio.md:16 +#, fuzzy msgid "/// GPIO port 0 peripheral address\n" -msgstr "" +msgstr "/// Adresa periferică a portului GPIO 0\n" -#: src/bare-metal/microcontrollers/mmio.md +#: src/bare-metal/microcontrollers/mmio.md:19 +#, fuzzy msgid "// GPIO peripheral offsets\n" -msgstr "" +msgstr "// Decalajele perifericelor GPIO\n" -#: src/bare-metal/microcontrollers/mmio.md +#: src/bare-metal/microcontrollers/mmio.md:24 +#, fuzzy msgid "// PIN_CNF fields\n" -msgstr "" +msgstr "// Câmpurile PIN_CNF\n" -#: src/bare-metal/microcontrollers/mmio.md -#: src/bare-metal/microcontrollers/pacs.md -#: src/bare-metal/microcontrollers/hals.md +#: src/bare-metal/microcontrollers/mmio.md:34 +#: src/bare-metal/microcontrollers/pacs.md:21 +#: src/bare-metal/microcontrollers/hals.md:26 +#, fuzzy msgid "// Configure GPIO 0 pins 21 and 28 as push-pull outputs.\n" -msgstr "" +msgstr "// Configurați pinii GPIO 0 21 și 28 ca ieșiri push-pull.\n" -#: src/bare-metal/microcontrollers/mmio.md +#: src/bare-metal/microcontrollers/mmio.md:37 +#: src/bare-metal/microcontrollers/mmio.md:59 +#, fuzzy msgid "" "// Safe because the pointers are to valid peripheral control registers, and\n" " // no aliases exist.\n" msgstr "" +"// Sigur, deoarece indicatorii sunt la registrele de control periferic " +"valide, și\n" +" // nu există alias-uri.\n" -#: src/bare-metal/microcontrollers/mmio.md -#: src/bare-metal/microcontrollers/pacs.md -#: src/bare-metal/microcontrollers/hals.md +#: src/bare-metal/microcontrollers/mmio.md:56 +#: src/bare-metal/microcontrollers/pacs.md:39 +#: src/bare-metal/microcontrollers/hals.md:30 +#, fuzzy msgid "// Set pin 28 low and pin 21 high to turn the LED on.\n" msgstr "" +"// Setați pinul 28 la nivel scăzut și pinul 21 la nivel ridicat pentru a " +"aprinde LED-ul.\n" -#: src/bare-metal/microcontrollers/mmio.md +#: src/bare-metal/microcontrollers/mmio.md:72 #, fuzzy msgid "" "GPIO 0 pin 21 is connected to the first column of the LED matrix, and pin 28 " @@ -16915,20 +20350,20 @@ msgstr "" "Pinul 21 al GPIO 0 este conectat la prima coloană a matricei de LED-uri, iar " "pinul 28 la primul rând." -#: src/bare-metal/microcontrollers/mmio.md -#: src/bare-metal/microcontrollers/pacs.md -#: src/bare-metal/microcontrollers/hals.md -#: src/bare-metal/microcontrollers/board-support.md +#: src/bare-metal/microcontrollers/mmio.md:75 +#: src/bare-metal/microcontrollers/pacs.md:61 +#: src/bare-metal/microcontrollers/hals.md:44 +#: src/bare-metal/microcontrollers/board-support.md:37 #, fuzzy msgid "Run the example with:" msgstr "Rulați exemplul cu:" -#: src/bare-metal/microcontrollers/pacs.md +#: src/bare-metal/microcontrollers/pacs.md:1 #, fuzzy msgid "Peripheral Access Crates" msgstr "Lăzi de acces periferic" -#: src/bare-metal/microcontrollers/pacs.md +#: src/bare-metal/microcontrollers/pacs.md:3 #, fuzzy msgid "" "[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust " @@ -16939,7 +20374,7 @@ msgstr "" "mare parte sigure pentru perifericele cu memorie mapă din fișierele [CMSIS-" "SVD](https://www.keil.com/pack/doc/CMSIS/SVD/html/index.html)." -#: src/bare-metal/microcontrollers/pacs.md +#: src/bare-metal/microcontrollers/pacs.md:49 #, fuzzy msgid "" "SVD (System View Description) files are XML files typically provided by " @@ -16948,7 +20383,7 @@ msgstr "" "Fișierele SVD (System View Description) sunt fișiere XML furnizate de obicei " "de furnizorii de siliciu care descriu harta de memorie a dispozitivului." -#: src/bare-metal/microcontrollers/pacs.md +#: src/bare-metal/microcontrollers/pacs.md:51 #, fuzzy msgid "" "They are organised by peripheral, register, field and value, with names, " @@ -16957,7 +20392,7 @@ msgstr "" "Acestea sunt organizate în funcție de periferic, registru, câmp și valoare, " "cu nume, descrieri, adrese etc." -#: src/bare-metal/microcontrollers/pacs.md +#: src/bare-metal/microcontrollers/pacs.md:53 #, fuzzy msgid "" "SVD files are often buggy and incomplete, so there are various projects " @@ -16968,12 +20403,12 @@ msgstr "" "proiecte care corectează greșelile, adaugă detaliile lipsă și publică " "lădițele generate." -#: src/bare-metal/microcontrollers/pacs.md +#: src/bare-metal/microcontrollers/pacs.md:56 #, fuzzy msgid "`cortex-m-rt` provides the vector table, among other things." msgstr "`cortex-m-rt` furnizează, printre altele, tabelul vectorial." -#: src/bare-metal/microcontrollers/pacs.md +#: src/bare-metal/microcontrollers/pacs.md:57 #, fuzzy msgid "" "If you `cargo install cargo-binutils` then you can run `cargo objdump --bin " @@ -16982,12 +20417,12 @@ msgstr "" "Dacă instalați `cargo install cargo-binutils` atunci puteți rula `cargo " "objdump --bin pac -- -d --no-show-raw-insn` pentru a vedea binarul rezultat." -#: src/bare-metal/microcontrollers/hals.md +#: src/bare-metal/microcontrollers/hals.md:1 #, fuzzy msgid "HAL crates" -msgstr "Lăzi HAL" +msgstr "Lăzi (crates) HAL" -#: src/bare-metal/microcontrollers/hals.md +#: src/bare-metal/microcontrollers/hals.md:3 #, fuzzy msgid "" "[HAL crates](https://github.com/rust-embedded/awesome-embedded-rust#hal-" @@ -17000,11 +20435,12 @@ msgstr "" "jurul diferitelor periferice. Acestea implementează în general trăsături din " "[`embedded-hal`](https://crates.io/crates/embedded-hal)." -#: src/bare-metal/microcontrollers/hals.md +#: src/bare-metal/microcontrollers/hals.md:23 +#, fuzzy msgid "// Create HAL wrapper for GPIO port 0.\n" -msgstr "" +msgstr "// Creați un înveliș HAL pentru portul GPIO 0.\n" -#: src/bare-metal/microcontrollers/hals.md +#: src/bare-metal/microcontrollers/hals.md:40 #, fuzzy msgid "" "`set_low` and `set_high` are methods on the `embedded_hal` `OutputPin` trait." @@ -17012,7 +20448,7 @@ msgstr "" "`set_low` și `set_high` sunt metode ale trăsăturii `OutputPin` " "`embedded_hal`." -#: src/bare-metal/microcontrollers/hals.md +#: src/bare-metal/microcontrollers/hals.md:41 #, fuzzy msgid "" "HAL crates exist for many Cortex-M and RISC-V devices, including various " @@ -17021,12 +20457,12 @@ msgstr "" "HAL crates există pentru multe dispozitive Cortex-M și RISC-V, inclusiv " "pentru diverse microcontrolere STM32, GD32, nRF, NXP, MSP430, AVR și PIC." -#: src/bare-metal/microcontrollers/board-support.md +#: src/bare-metal/microcontrollers/board-support.md:1 #, fuzzy msgid "Board support crates" -msgstr "Suport de bord lăzi" +msgstr "Lăzi de suport pentru plăci" -#: src/bare-metal/microcontrollers/board-support.md +#: src/bare-metal/microcontrollers/board-support.md:3 #, fuzzy msgid "" "Board support crates provide a further level of wrapping for a specific " @@ -17035,7 +20471,7 @@ msgstr "" "Lăzile de susținere a plăcilor oferă un nivel suplimentar de împachetare " "pentru o anumită placă, pentru mai multă comoditate." -#: src/bare-metal/microcontrollers/board-support.md +#: src/bare-metal/microcontrollers/board-support.md:31 #, fuzzy msgid "" "In this case the board support crate is just providing more useful names, " @@ -17044,7 +20480,7 @@ msgstr "" "În acest caz, suportul pentru plăci oferă doar nume mai utile și o mică " "inițializare." -#: src/bare-metal/microcontrollers/board-support.md +#: src/bare-metal/microcontrollers/board-support.md:33 #, fuzzy msgid "" "The crate may also include drivers for some on-board devices outside of the " @@ -17053,25 +20489,27 @@ msgstr "" "De asemenea, pachetul poate include drivere pentru unele dispozitive de la " "bord în afara microcontrolerului propriu-zis." -#: src/bare-metal/microcontrollers/board-support.md +#: src/bare-metal/microcontrollers/board-support.md:35 #, fuzzy msgid "`microbit-v2` includes a simple driver for the LED matrix." msgstr "`microbit-v2` include un driver simplu pentru matricea de LED-uri." -#: src/bare-metal/microcontrollers/type-state.md +#: src/bare-metal/microcontrollers/type-state.md:1 #, fuzzy msgid "The type state pattern" msgstr "Modelul de stare de tip" -#: src/bare-metal/microcontrollers/type-state.md +#: src/bare-metal/microcontrollers/type-state.md:11 +#, fuzzy msgid "// let gpio0_01_again = gpio0.p0_01; // Error, moved.\n" -msgstr "" +msgstr "// let gpio0_01_again = gpio0.p0_01; // Eroare, mutat.\n" -#: src/bare-metal/microcontrollers/type-state.md +#: src/bare-metal/microcontrollers/type-state.md:19 +#, fuzzy msgid "// pin_input.is_high(); // Error, moved.\n" -msgstr "" +msgstr "// pin_input.is_high(); // Eroare, mutat.\n" -#: src/bare-metal/microcontrollers/type-state.md +#: src/bare-metal/microcontrollers/type-state.md:33 #, fuzzy msgid "" "Pins don't implement `Copy` or `Clone`, so only one instance of each can " @@ -17081,7 +20519,7 @@ msgstr "" "singură instanță a fiecăruia. Odată ce un pin este mutat din structura " "portului, nimeni altcineva nu îl poate lua." -#: src/bare-metal/microcontrollers/type-state.md +#: src/bare-metal/microcontrollers/type-state.md:35 #, fuzzy msgid "" "Changing the configuration of a pin consumes the old pin instance, so you " @@ -17090,7 +20528,7 @@ msgstr "" "Schimbarea configurației unui pin consumă vechea instanță de pin, astfel " "încât nu mai puteți continua să folosiți vechea instanță după aceea." -#: src/bare-metal/microcontrollers/type-state.md +#: src/bare-metal/microcontrollers/type-state.md:37 #, fuzzy msgid "" "The type of a value indicates the state that it is in: e.g. in this case, " @@ -17106,7 +20544,7 @@ msgstr "" "corespunzător. Tranzițiile de stare ilegale sunt detectate în momentul " "compilării." -#: src/bare-metal/microcontrollers/type-state.md +#: src/bare-metal/microcontrollers/type-state.md:42 #, fuzzy msgid "" "You can call `is_high` on an input pin and `set_high` on an output pin, but " @@ -17115,12 +20553,12 @@ msgstr "" "Puteți apela `is_high` pe un pin de intrare și `set_high` pe un pin de " "ieșire, dar nu și invers." -#: src/bare-metal/microcontrollers/type-state.md +#: src/bare-metal/microcontrollers/type-state.md:44 #, fuzzy msgid "Many HAL crates follow this pattern." msgstr "Multe lăzi HAL urmează acest model." -#: src/bare-metal/microcontrollers/embedded-hal.md +#: src/bare-metal/microcontrollers/embedded-hal.md:3 #, fuzzy msgid "" "The [`embedded-hal`](https://crates.io/crates/embedded-hal) crate provides a " @@ -17130,37 +20568,32 @@ msgstr "" "serie de caracteristici care acoperă perifericele comune ale " "microcontrolerului." -#: src/bare-metal/microcontrollers/embedded-hal.md -#, fuzzy +#: src/bare-metal/microcontrollers/embedded-hal.md:6 msgid "GPIO" msgstr "GPIO" -#: src/bare-metal/microcontrollers/embedded-hal.md -#, fuzzy +#: src/bare-metal/microcontrollers/embedded-hal.md:7 msgid "ADC" msgstr "ADC" -#: src/bare-metal/microcontrollers/embedded-hal.md -#, fuzzy +#: src/bare-metal/microcontrollers/embedded-hal.md:8 msgid "I2C, SPI, UART, CAN" msgstr "I2C, SPI, UART, CAN" -#: src/bare-metal/microcontrollers/embedded-hal.md -#, fuzzy +#: src/bare-metal/microcontrollers/embedded-hal.md:9 msgid "RNG" msgstr "RNG" -#: src/bare-metal/microcontrollers/embedded-hal.md -#, fuzzy +#: src/bare-metal/microcontrollers/embedded-hal.md:10 msgid "Timers" -msgstr "Cronometre" +msgstr "Timers" -#: src/bare-metal/microcontrollers/embedded-hal.md +#: src/bare-metal/microcontrollers/embedded-hal.md:11 #, fuzzy msgid "Watchdogs" msgstr "Câini de pază" -#: src/bare-metal/microcontrollers/embedded-hal.md +#: src/bare-metal/microcontrollers/embedded-hal.md:13 #, fuzzy msgid "" "Other crates then implement [drivers](https://github.com/rust-embedded/" @@ -17172,7 +20605,7 @@ msgstr "" "exemplu, un driver pentru accelerometru poate avea nevoie de o implementare " "a bus-ului I2C sau SPI." -#: src/bare-metal/microcontrollers/embedded-hal.md +#: src/bare-metal/microcontrollers/embedded-hal.md:20 #, fuzzy msgid "" "There are implementations for many microcontrollers, as well as other " @@ -17181,7 +20614,7 @@ msgstr "" "Există implementări pentru multe microcontrolere, precum și pentru alte " "platforme, cum ar fi Linux pe Raspberry Pi." -#: src/bare-metal/microcontrollers/embedded-hal.md +#: src/bare-metal/microcontrollers/embedded-hal.md:22 #, fuzzy msgid "" "There is work in progress on an `async` version of `embedded-hal`, but it " @@ -17190,7 +20623,7 @@ msgstr "" "Se lucrează în prezent la o versiune `async` a `embedded-hal`, dar nu este " "încă stabilă." -#: src/bare-metal/microcontrollers/probe-rs.md +#: src/bare-metal/microcontrollers/probe-rs.md:3 #, fuzzy msgid "" "[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, " @@ -17199,24 +20632,23 @@ msgstr "" "[probe-rs](https://probe.rs/) este un set de instrumente utile pentru " "depanarea embedded, precum OpenOCD, dar mai bine integrat." -#: src/bare-metal/microcontrollers/probe-rs.md +#: src/bare-metal/microcontrollers/probe-rs.md:6 #, fuzzy msgid "" "SWD (Serial Wire Debug) and JTAG via CMSIS-DAP, ST-Link and J-Link probes" msgstr "" "SWD (Serial Wire Debug) și JTAG prin sonde CMSIS-DAP, ST-Link și J-Link" -#: src/bare-metal/microcontrollers/probe-rs.md +#: src/bare-metal/microcontrollers/probe-rs.md:7 #, fuzzy msgid "GDB stub and Microsoft DAP (Debug Adapter Protocol) server" msgstr "GDB stub și serverul Microsoft DAP (Debug Adapter Protocol)" -#: src/bare-metal/microcontrollers/probe-rs.md -#, fuzzy +#: src/bare-metal/microcontrollers/probe-rs.md:8 msgid "Cargo integration" -msgstr "Integrarea încărcăturii" +msgstr "Integrarea Cargo" -#: src/bare-metal/microcontrollers/probe-rs.md +#: src/bare-metal/microcontrollers/probe-rs.md:10 #, fuzzy msgid "" "`cargo-embed` is a cargo subcommand to build and flash binaries, log RTT " @@ -17228,7 +20660,7 @@ msgstr "" "configurată de un fișier `Embed.toml` din directorul proiectului " "dumneavoastră." -#: src/bare-metal/microcontrollers/probe-rs.md +#: src/bare-metal/microcontrollers/probe-rs.md:16 #, fuzzy msgid "" "[CMSIS-DAP](https://arm-software.github.io/CMSIS_5/DAP/html/index.html) is " @@ -17241,7 +20673,7 @@ msgstr "" "acceseze portul de acces la depanare CoreSight al diferitelor procesoare Arm " "Cortex. Este ceea ce folosește depanatorul de bord de pe BBC micro:bit." -#: src/bare-metal/microcontrollers/probe-rs.md +#: src/bare-metal/microcontrollers/probe-rs.md:20 #, fuzzy msgid "" "ST-Link is a range of in-circuit debuggers from ST Microelectronics, J-Link " @@ -17250,7 +20682,7 @@ msgstr "" "ST-Link este o gamă de depanatoare în circuit de la ST Microelectronics, iar " "J-Link este o gamă de la SEGGER." -#: src/bare-metal/microcontrollers/probe-rs.md +#: src/bare-metal/microcontrollers/probe-rs.md:22 #, fuzzy msgid "" "The Debug Access Port is usually either a 5-pin JTAG interface or 2-pin " @@ -17259,7 +20691,7 @@ msgstr "" "Portul de acces pentru depanare este, de obicei, fie o interfață JTAG cu 5 " "pini, fie o interfață de depanare prin cablu serial cu 2 pini." -#: src/bare-metal/microcontrollers/probe-rs.md +#: src/bare-metal/microcontrollers/probe-rs.md:24 #, fuzzy msgid "" "probe-rs is a library which you can integrate into your own tools if you " @@ -17268,7 +20700,7 @@ msgstr "" "probe-rs este o bibliotecă pe care o puteți integra în propriile " "instrumente, dacă doriți." -#: src/bare-metal/microcontrollers/probe-rs.md +#: src/bare-metal/microcontrollers/probe-rs.md:26 #, fuzzy msgid "" "The [Microsoft Debug Adapter Protocol](https://microsoft.github.io/debug-" @@ -17279,12 +20711,12 @@ msgstr "" "protocol/) permite VSCode și altor IDE-uri să depaneze codul care rulează pe " "orice microcontroler acceptat." -#: src/bare-metal/microcontrollers/probe-rs.md +#: src/bare-metal/microcontrollers/probe-rs.md:30 #, fuzzy msgid "cargo-embed is a binary built using the probe-rs library." msgstr "cargo-embed este un binar construit folosind biblioteca probe-rs." -#: src/bare-metal/microcontrollers/probe-rs.md +#: src/bare-metal/microcontrollers/probe-rs.md:31 #, fuzzy msgid "" "RTT (Real Time Transfers) is a mechanism to transfer data between the debug " @@ -17293,48 +20725,48 @@ msgstr "" "RTT (Real Time Transfers) este un mecanism de transfer de date între gazda " "de depanare și țintă prin intermediul unui număr de ringbufferi." -#: src/bare-metal/microcontrollers/debugging.md +#: src/bare-metal/microcontrollers/debugging.md:3 #, fuzzy msgid "_Embed.toml_:" msgstr "_Embed.toml_:" -#: src/bare-metal/microcontrollers/debugging.md +#: src/bare-metal/microcontrollers/debugging.md:15 #, fuzzy msgid "In one terminal under `src/bare-metal/microcontrollers/examples/`:" msgstr "Într-un terminal, sub `src/bare-metal/microcontrollers/examples/`:" -#: src/bare-metal/microcontrollers/debugging.md +#: src/bare-metal/microcontrollers/debugging.md:23 #, fuzzy msgid "In another terminal in the same directory:" msgstr "Într-un alt terminal din același director:" -#: src/bare-metal/microcontrollers/debugging.md +#: src/bare-metal/microcontrollers/debugging.md:25 #, fuzzy msgid "On gLinux or Debian:" msgstr "Pe gLinux sau Debian:" -#: src/bare-metal/microcontrollers/debugging.md +#: src/bare-metal/microcontrollers/debugging.md:43 #, fuzzy msgid "In GDB, try running:" msgstr "În GDB, încercați să rulați:" -#: src/bare-metal/microcontrollers/other-projects.md -#: src/bare-metal/aps/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:1 +#: src/bare-metal/aps/other-projects.md:1 #, fuzzy msgid "Other projects" msgstr "Alte proiecte" -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:3 #, fuzzy msgid "[RTIC](https://rtic.rs/)" msgstr "[RTIC](https://rtic.rs/)" -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:4 #, fuzzy msgid "\"Real-Time Interrupt-driven Concurrency\"" msgstr "\"Concurrența în timp real bazată pe întreruperi\"" -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:5 #, fuzzy msgid "" "Shared resource management, message passing, task scheduling, timer queue" @@ -17342,22 +20774,22 @@ msgstr "" "Gestionarea resurselor partajate, trecerea mesajelor, programarea " "sarcinilor, coada de timp" -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:6 #, fuzzy msgid "[Embassy](https://embassy.dev/)" msgstr "[Ambasada](https://embassy.dev/)" -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:7 #, fuzzy msgid "`async` executors with priorities, timers, networking, USB" msgstr "executori `async` cu priorități, cronometre, rețea, USB" -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:8 #, fuzzy msgid "[TockOS](https://www.tockos.org/documentation/getting-started)" msgstr "[TockOS](https://www.tockos.org/documentation/getting-started)" -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:9 #, fuzzy msgid "" "Security-focused RTOS with preemptive scheduling and Memory Protection Unit " @@ -17366,12 +20798,12 @@ msgstr "" "RTOS axat pe securitate, cu programare preemptivă și suport pentru unitatea " "de protecție a memoriei" -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:11 #, fuzzy msgid "[Hubris](https://hubris.oxide.computer/)" msgstr "[Hubris](https://hubris.oxide.computer/)" -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:12 #, fuzzy msgid "" "Microkernel RTOS from Oxide Computer Company with memory protection, " @@ -17380,12 +20812,12 @@ msgstr "" "Microkernel RTOS de la Oxide Computer Company cu protecție de memorie, " "drivere neprivilegiate, IPC" -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:14 #, fuzzy msgid "[Bindings for FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)" msgstr "[Legături pentru FreeRTOS](https://github.com/lobaro/FreeRTOS-rust)" -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:15 #, fuzzy msgid "" "Some platforms have `std` implementations, e.g. [esp-idf](https://esp-rs." @@ -17394,17 +20826,17 @@ msgstr "" "Unele platforme au implementări `std`, de exemplu [esp-idf](https://esp-rs." "github.io/book/overview/using-the-standard-library.html)." -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:20 #, fuzzy msgid "RTIC can be considered either an RTOS or a concurrency framework." msgstr "RTIC poate fi considerat fie un RTOS, fie un cadru de concurență." -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:21 #, fuzzy msgid "It doesn't include any HALs." msgstr "Nu include niciun HAL." -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:22 #, fuzzy msgid "" "It uses the Cortex-M NVIC (Nested Virtual Interrupt Controller) for " @@ -17413,12 +20845,12 @@ msgstr "" "Acesta utilizează Cortex-M NVIC (Nested Virtual Interrupt Controller) pentru " "programare, în loc de un kernel propriu-zis." -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:24 #, fuzzy msgid "Cortex-M only." msgstr "Numai Cortex-M." -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:25 #, fuzzy msgid "" "Google uses TockOS on the Haven microcontroller for Titan security keys." @@ -17426,7 +20858,7 @@ msgstr "" "Google folosește TockOS pe microcontrolerul Haven pentru cheile de " "securitate Titan." -#: src/bare-metal/microcontrollers/other-projects.md +#: src/bare-metal/microcontrollers/other-projects.md:26 #, fuzzy msgid "" "FreeRTOS is mostly written in C, but there are Rust bindings for writing " @@ -17435,7 +20867,7 @@ msgstr "" "FreeRTOS este scris în mare parte în C, dar există legături Rust pentru " "scrierea de aplicații." -#: src/exercises/bare-metal/morning.md +#: src/exercises/bare-metal/morning.md:3 #, fuzzy msgid "" "We will read the direction from an I2C compass, and log the readings to a " @@ -17444,16 +20876,16 @@ msgstr "" "Vom citi direcția de la o busolă I2C și vom înregistra citirile pe un port " "serial." -#: src/exercises/bare-metal/morning.md src/exercises/concurrency/morning.md -#, fuzzy +#: src/exercises/bare-metal/morning.md:8 +#: src/exercises/concurrency/morning.md:12 msgid "" "After looking at the exercises, you can look at the [solutions](solutions-" "morning.md) provided." msgstr "" -"După ce ați studiat exercițiile, puteți consulta [soluții](solutions-morning." -"md) furnizate." +"După ce ați studiat exercițiile, puteți consulta [soluțile](solutions-" +"morning.md) furnizate." -#: src/exercises/bare-metal/compass.md +#: src/exercises/bare-metal/compass.md:3 #, fuzzy msgid "" "We will read the direction from an I2C compass, and log the readings to a " @@ -17464,12 +20896,12 @@ msgstr "" "serial. Dacă aveți timp, încercați să o afișați cumva și pe LED-uri sau să " "folosiți cumva butoanele." -#: src/exercises/bare-metal/compass.md +#: src/exercises/bare-metal/compass.md:7 #, fuzzy msgid "Hints:" msgstr "Sugestii:" -#: src/exercises/bare-metal/compass.md +#: src/exercises/bare-metal/compass.md:9 #, fuzzy msgid "" "Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/" @@ -17482,7 +20914,7 @@ msgstr "" "latest/microbit/), precum și pentru [micro:bit hardware](https://tech." "microbit.org/hardware/)." -#: src/exercises/bare-metal/compass.md +#: src/exercises/bare-metal/compass.md:13 #, fuzzy msgid "" "The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus." @@ -17490,7 +20922,7 @@ msgstr "" "Unitatea de măsurare inerțială LSM303AGR este conectată la magistrala " "internă I2C." -#: src/exercises/bare-metal/compass.md +#: src/exercises/bare-metal/compass.md:14 #, fuzzy msgid "" "TWI is another name for I2C, so the I2C master peripheral is called TWIM." @@ -17498,7 +20930,7 @@ msgstr "" "TWI este un alt nume pentru I2C, astfel încât perifericul master I2C se " "numește TWIM." -#: src/exercises/bare-metal/compass.md +#: src/exercises/bare-metal/compass.md:15 #, fuzzy msgid "" "The LSM303AGR driver needs something implementing the `embedded_hal::" @@ -17510,7 +20942,7 @@ msgstr "" "(https://docs.rs/microbit-v2/latest/microbit/hal/struct.Twim.html) " "implementează acest lucru." -#: src/exercises/bare-metal/compass.md +#: src/exercises/bare-metal/compass.md:19 #, fuzzy msgid "" "You have a [`microbit::Board`](https://docs.rs/microbit-v2/latest/microbit/" @@ -17519,7 +20951,7 @@ msgstr "" "Aveți o structură [`microbit::Board`](https://docs.rs/microbit-v2/latest/" "microbit/struct.Board.html) cu câmpuri pentru diverși pini și periferice." -#: src/exercises/bare-metal/compass.md +#: src/exercises/bare-metal/compass.md:22 #, fuzzy msgid "" "You can also look at the [nRF52833 datasheet](https://infocenter.nordicsemi." @@ -17530,7 +20962,7 @@ msgstr "" "nordicsemi.com/pdf/nRF52833_PS_v1.5.pdf), dar nu ar trebui să fie necesar " "pentru acest exercițiu." -#: src/exercises/bare-metal/compass.md +#: src/exercises/bare-metal/compass.md:26 #, fuzzy msgid "" "Download the [exercise template](../../comprehensive-rust-exercises.zip) and " @@ -17539,114 +20971,111 @@ msgstr "" "Descărcați [șablonul de exerciții] (../../comprehensive-rust-exercises.zip) " "și căutați în directorul `compass` următoarele fișiere." -#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/compass.md:29 src/exercises/bare-metal/rtc.md:22 #, fuzzy msgid "_src/main.rs_:" msgstr "src/main.rs_:" -#: src/exercises/bare-metal/compass.md -#: src/exercises/bare-metal/solutions-morning.md -msgid "// Configure serial port.\n" -msgstr "" - -#: src/exercises/bare-metal/compass.md -#: src/exercises/bare-metal/solutions-morning.md -msgid "// Use the system timer as a delay provider.\n" -msgstr "" - -#: src/exercises/bare-metal/compass.md -msgid "" -"// Set up the I2C controller and Inertial Measurement Unit.\n" -" // TODO\n" -msgstr "" - -#: src/exercises/bare-metal/compass.md -#: src/exercises/bare-metal/solutions-morning.md -msgid "\"Ready.\"" -msgstr "" - -#: src/exercises/bare-metal/compass.md -msgid "" -"// Read compass data and log it to the serial port.\n" -" // TODO\n" -msgstr "" - -#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/compass.md:71 src/exercises/bare-metal/rtc.md:391 #, fuzzy msgid "_Cargo.toml_ (you shouldn't need to change this):" msgstr "_Cargo.toml_ (nu ar trebui să fie nevoie să modificați acest lucru):" -#: src/exercises/bare-metal/compass.md +#: src/exercises/bare-metal/compass.md:93 #, fuzzy msgid "_Embed.toml_ (you shouldn't need to change this):" msgstr "_Embed.toml_ (nu ar trebui să fie nevoie să modificați acest lucru):" -#: src/exercises/bare-metal/compass.md src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/compass.md:109 src/exercises/bare-metal/rtc.md:998 #, fuzzy msgid "_.cargo/config.toml_ (you shouldn't need to change this):" msgstr "" "_.cargo/config.toml_ (nu ar trebui să fie nevoie să modificați acest lucru):" -#: src/exercises/bare-metal/compass.md +#: src/exercises/bare-metal/compass.md:122 #, fuzzy msgid "See the serial output on Linux with:" msgstr "Vedeți ieșirea serială pe Linux cu:" -#: src/exercises/bare-metal/compass.md +#: src/exercises/bare-metal/compass.md:130 #, fuzzy msgid "" "Or on Mac OS something like (the device name may be slightly different):" msgstr "" "Sau, pe Mac OS, ceva de genul (numele dispozitivului poate fi ușor diferit):" -#: src/exercises/bare-metal/compass.md +#: src/exercises/bare-metal/compass.md:138 #, fuzzy msgid "Use Ctrl+A Ctrl+Q to quit picocom." msgstr "Folosiți Ctrl+A Ctrl+Q pentru a ieși din picocom." -#: src/exercises/bare-metal/solutions-morning.md +#: src/exercises/bare-metal/solutions-morning.md:1 #, fuzzy msgid "Bare Metal Rust Morning Exercise" msgstr "Exercițiu de dimineață Bare Metal Rust" -#: src/exercises/bare-metal/solutions-morning.md +#: src/exercises/bare-metal/solutions-morning.md:5 #, fuzzy msgid "([back to exercise](compass.md))" msgstr "([back to exercise](compass.md))" -#: src/exercises/bare-metal/solutions-morning.md +#: src/exercises/bare-metal/solutions-morning.md:34 +#, fuzzy +msgid "// Configure serial port.\n" +msgstr "// Configurați portul serial.\n" + +#: src/exercises/bare-metal/solutions-morning.md:42 +#, fuzzy +msgid "// Use the system timer as a delay provider.\n" +msgstr "// Utilizați temporizatorul sistemului ca furnizor de întârzieri.\n" + +#: src/exercises/bare-metal/solutions-morning.md:45 +#, fuzzy msgid "// Set up the I2C controller and Inertial Measurement Unit.\n" -msgstr "" +msgstr "// Configurați controlerul I2C și unitatea de măsurare inerțială.\n" -#: src/exercises/bare-metal/solutions-morning.md +#: src/exercises/bare-metal/solutions-morning.md:46 +#, fuzzy msgid "\"Setting up IMU...\"" -msgstr "" +msgstr "\"Configurarea IMU...\"" -#: src/exercises/bare-metal/solutions-morning.md +#: src/exercises/bare-metal/solutions-morning.md:64 +#, fuzzy msgid "// Set up display and timer.\n" -msgstr "" +msgstr "// Configurați afișajul și cronometrul.\n" + +#: src/exercises/bare-metal/solutions-morning.md:71 +#, fuzzy +msgid "\"Ready.\"" +msgstr "\"Gata.\"" -#: src/exercises/bare-metal/solutions-morning.md +#: src/exercises/bare-metal/solutions-morning.md:74 +#, fuzzy msgid "// Read compass data and log it to the serial port.\n" -msgstr "" +msgstr "// Citiți datele busolei și înregistrați-le pe portul serial.\n" -#: src/exercises/bare-metal/solutions-morning.md +#: src/exercises/bare-metal/solutions-morning.md:82 +#, fuzzy msgid "\"{},{},{}\\t{},{},{}\"" -msgstr "" +msgstr "Partiții: `&[T]`" -#: src/exercises/bare-metal/solutions-morning.md +#: src/exercises/bare-metal/solutions-morning.md:120 +#, fuzzy msgid "" "// If button A is pressed, switch to the next mode and briefly blink all " "LEDs\n" " // on.\n" msgstr "" +"// Dacă este apăsat butonul A, se trece la modul următor și clipesc pentru " +"scurt timp toate LED-urile\n" +" // pornit.\n" -#: src/bare-metal/aps.md +#: src/bare-metal/aps.md:1 #, fuzzy msgid "Application processors" -msgstr "Procesoare de aplicații" +msgstr "Procesatori de aplicații" -#: src/bare-metal/aps.md +#: src/bare-metal/aps.md:3 #, fuzzy msgid "" "So far we've talked about microcontrollers, such as the Arm Cortex-M series. " @@ -17659,7 +21088,7 @@ msgstr "" "lucra doar cu placa aarch64 ['virt'](https://qemu-project.gitlab.io/qemu/" "system/arm/virt.html) a lui QEMU." -#: src/bare-metal/aps.md +#: src/bare-metal/aps.md:10 #, fuzzy msgid "" "Broadly speaking, microcontrollers don't have an MMU or multiple levels of " @@ -17670,7 +21099,7 @@ msgstr "" "privilegii (niveluri de excepție la procesoarele Arm, inele la x86), în timp " "ce procesoarele de aplicații au." -#: src/bare-metal/aps.md +#: src/bare-metal/aps.md:13 #, fuzzy msgid "" "QEMU supports emulating various different machines or board models for each " @@ -17681,7 +21110,7 @@ msgstr "" "fiecare arhitectură. Placa \"virt\" nu corespunde unui anumit hardware real, " "ci este concepută exclusiv pentru mașini virtuale." -#: src/bare-metal/aps/entry-point.md +#: src/bare-metal/aps/entry-point.md:3 #, fuzzy msgid "" "Before we can start running Rust code, we need to do some initialisation." @@ -17689,7 +21118,7 @@ msgstr "" "Înainte de a începe să rulăm codul Rust, trebuie să facem o anumită " "inițializare." -#: src/bare-metal/aps/entry-point.md +#: src/bare-metal/aps/entry-point.md:5 #, fuzzy msgid "" "```armasm\n" @@ -17839,7 +21268,7 @@ msgstr "" " b 2b\n" "```" -#: src/bare-metal/aps/entry-point.md +#: src/bare-metal/aps/entry-point.md:77 #, fuzzy msgid "" "This is the same as it would be for C: initialising the processor state, " @@ -17848,7 +21277,7 @@ msgstr "" "Aceasta este aceeași ca și în C: inițializarea stării procesorului, anularea " "BSS și stabilirea pointerului de stivă." -#: src/bare-metal/aps/entry-point.md +#: src/bare-metal/aps/entry-point.md:79 #, fuzzy msgid "" "The BSS (block starting symbol, for historical reasons) is the part of the " @@ -17863,7 +21292,7 @@ msgstr "" "risipa de spațiu cu zerouri. Compilatorul pornește de la premisa că " "încărcătorul se va ocupa de punerea lor la zero." -#: src/bare-metal/aps/entry-point.md +#: src/bare-metal/aps/entry-point.md:84 #, fuzzy msgid "" "The BSS may already be zeroed, depending on how memory is initialised and " @@ -17873,7 +21302,7 @@ msgstr "" "este inițializată și imaginea este încărcată, dar trebuie să îl punem la " "zero pentru a fi siguri." -#: src/bare-metal/aps/entry-point.md +#: src/bare-metal/aps/entry-point.md:86 #, fuzzy msgid "" "We need to enable the MMU and cache before reading or writing any memory. If " @@ -17882,7 +21311,7 @@ msgstr "" "Trebuie să activăm MMU și memoria cache înainte de a citi sau scrie în " "memorie. Dacă nu o facem:" -#: src/bare-metal/aps/entry-point.md +#: src/bare-metal/aps/entry-point.md:88 #, fuzzy msgid "" "Unaligned accesses will fault. We build the Rust code for the `aarch64-" @@ -17895,7 +21324,7 @@ msgstr "" "compilatorul să genereze accese nealiniate, deci ar trebui să fie în regulă " "în acest caz, dar nu este neapărat cazul în general." -#: src/bare-metal/aps/entry-point.md +#: src/bare-metal/aps/entry-point.md:92 #, fuzzy msgid "" "If it were running in a VM, this can lead to cache coherency issues. The " @@ -17916,7 +21345,7 @@ msgstr "" "activează memoria cache. (Memoria cache este codificată în funcție de adresa " "fizică, nu de VA sau IPA)" -#: src/bare-metal/aps/entry-point.md +#: src/bare-metal/aps/entry-point.md:99 #, fuzzy msgid "" "For simplicity, we just use a hardcoded pagetable (see `idmap.S`) which " @@ -17930,7 +21359,7 @@ msgstr "" "multe dispozitive. Acest lucru se potrivește cu dispunerea memoriei pe care " "o folosește QEMU." -#: src/bare-metal/aps/entry-point.md +#: src/bare-metal/aps/entry-point.md:103 #, fuzzy msgid "" "We also set up the exception vector (`vbar_el1`), which we'll see more about " @@ -17939,7 +21368,7 @@ msgstr "" "De asemenea, am configurat vectorul de excepții (`vbar_el1`), despre care " "vom vedea mai multe mai târziu." -#: src/bare-metal/aps/entry-point.md +#: src/bare-metal/aps/entry-point.md:105 #, fuzzy msgid "" "All examples this afternoon assume we will be running at exception level 1 " @@ -17950,12 +21379,12 @@ msgstr "" "de excepție 1 (EL1). Dacă aveți nevoie să rulați la un alt nivel de " "excepție, va trebui să modificați `entry.S` în consecință." -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:1 #, fuzzy msgid "Inline assembly" -msgstr "Ansamblu în linie" +msgstr "Ansamblare în linie" -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:3 #, fuzzy msgid "" "Sometimes we need to use assembly to do things that aren't possible with " @@ -17966,49 +21395,62 @@ msgstr "" "posibile cu codul Rust. De exemplu, pentru a face un apel HVC (hypervisor " "call) pentru a spune firmware-ului să oprească sistemul:" -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:20 +#, fuzzy msgid "" "// Safe because this only uses the declared registers and doesn't do\n" " // anything with memory.\n" msgstr "" +"// Sigur pentru că acest lucru folosește doar registrele declarate și nu " +"face\n" +" // nimic cu memoria.\n" -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:23 +#, fuzzy msgid "\"hvc #0\"" -msgstr "" +msgstr "\"hvc #0\"" -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:24 +#, fuzzy msgid "\"w0\"" -msgstr "" +msgstr "\"w0\"" -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:25 +#, fuzzy msgid "\"w1\"" -msgstr "" +msgstr "\"w1\"" -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:26 +#, fuzzy msgid "\"w2\"" -msgstr "" +msgstr "\"w2\"" -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:27 +#, fuzzy msgid "\"w3\"" -msgstr "" +msgstr "\"w3\"" -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:28 +#, fuzzy msgid "\"w4\"" -msgstr "" +msgstr "\"w4\"" -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:29 +#, fuzzy msgid "\"w5\"" -msgstr "" +msgstr "\"w5\"" -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:30 +#, fuzzy msgid "\"w6\"" -msgstr "" +msgstr "\"w6\"" -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:31 +#, fuzzy msgid "\"w7\"" -msgstr "" +msgstr "\"w7\"" -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:40 #, fuzzy msgid "" "(If you actually want to do this, use the [`smccc`](https://crates.io/crates/" @@ -18017,7 +21459,7 @@ msgstr "" "(Dacă doriți să faceți acest lucru, folosiți crăiasa [`smccc`](https://" "crates.io/crates/smccc) care are învelișuri pentru toate aceste funcții.)" -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:45 #, fuzzy msgid "" "PSCI is the Arm Power State Coordination Interface, a standard set of " @@ -18029,7 +21471,7 @@ msgstr "" "a procesorului, printre altele. Este implementată de firmware-ul EL3 și de " "hipervizoarele de pe multe sisteme." -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:48 #, fuzzy msgid "" "The `0 => _` syntax means initialise the register to 0 before running the " @@ -18042,7 +21484,7 @@ msgstr "" "Trebuie să folosim mai degrabă `inout` decât `in` deoarece apelul ar putea " "să distrugă conținutul registrelor." -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:52 #, fuzzy msgid "" "This `main` function needs to be `#[no_mangle]` and `extern \"C\"` because " @@ -18051,7 +21493,7 @@ msgstr "" "Această funcție `main` trebuie să fie `#[no_mangle]` și `extern \"C\"` " "deoarece este apelată din punctul nostru de intrare în `entry.S`." -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:54 #, fuzzy msgid "" "`_x0`–`_x3` are the values of registers `x0`–`x3`, which are conventionally " @@ -18070,7 +21512,7 @@ msgstr "" "special, cu excepția faptului că trebuie să se asigure că nu modifică aceste " "registre." -#: src/bare-metal/aps/inline-assembly.md +#: src/bare-metal/aps/inline-assembly.md:60 #, fuzzy msgid "" "Run the example in QEMU with `make qemu_psci` under `src/bare-metal/aps/" @@ -18078,22 +21520,22 @@ msgid "" msgstr "" "Rulați exemplul în QEMU cu `make qemu_psci` în `src/bare-metal/aps/examples`." -#: src/bare-metal/aps/mmio.md +#: src/bare-metal/aps/mmio.md:1 #, fuzzy msgid "Volatile memory access for MMIO" msgstr "Acces la memoria volatilă pentru MMIO" -#: src/bare-metal/aps/mmio.md +#: src/bare-metal/aps/mmio.md:3 #, fuzzy msgid "Use `pointer::read_volatile` and `pointer::write_volatile`." msgstr "Utilizați `pointer::read_volatile` și `pointer::write_volatile`." -#: src/bare-metal/aps/mmio.md +#: src/bare-metal/aps/mmio.md:4 #, fuzzy msgid "Never hold a reference." msgstr "Nu țineți niciodată o referință." -#: src/bare-metal/aps/mmio.md +#: src/bare-metal/aps/mmio.md:5 #, fuzzy msgid "" "`addr_of!` lets you get fields of structs without creating an intermediate " @@ -18102,7 +21544,7 @@ msgstr "" "`addr_of!` vă permite să obțineți câmpurile structurilor fără a crea o " "referință intermediară." -#: src/bare-metal/aps/mmio.md +#: src/bare-metal/aps/mmio.md:10 #, fuzzy msgid "" "Volatile access: read or write operations may have side-effects, so prevent " @@ -18112,7 +21554,7 @@ msgstr "" "deci împiedicați compilatorul sau hardware-ul să le reordoneze, să le " "dubleze sau să le eludeze." -#: src/bare-metal/aps/mmio.md +#: src/bare-metal/aps/mmio.md:12 #, fuzzy msgid "" "Usually if you write and then read, e.g. via a mutable reference, the " @@ -18124,7 +21566,7 @@ msgstr "" "aceeași cu cea care tocmai a fost scrisă și nu se mai obosește să citească " "efectiv memoria." -#: src/bare-metal/aps/mmio.md +#: src/bare-metal/aps/mmio.md:15 #, fuzzy msgid "" "Some existing crates for volatile access to hardware do hold references, but " @@ -18135,7 +21577,7 @@ msgstr "" "dar acest lucru nu este corect. Ori de câte ori există o referință, " "compilatorul poate alege să o deregleze." -#: src/bare-metal/aps/mmio.md +#: src/bare-metal/aps/mmio.md:18 #, fuzzy msgid "" "Use the `addr_of!` macro to get struct field pointers from a pointer to the " @@ -18144,12 +21586,12 @@ msgstr "" "Utilizați macroul `addr_of!` pentru a obține pointeri de câmpuri de " "structură dintr-un pointer la structură." -#: src/bare-metal/aps/uart.md +#: src/bare-metal/aps/uart.md:1 #, fuzzy msgid "Let's write a UART driver" msgstr "Să scriem un driver UART" -#: src/bare-metal/aps/uart.md +#: src/bare-metal/aps/uart.md:3 #, fuzzy msgid "" "The QEMU 'virt' machine has a [PL011](https://developer.arm.com/" @@ -18158,11 +21600,13 @@ msgstr "" "Mașina QEMU 'virt' are o UART [PL011](https://developer.arm.com/" "documentation/ddi0183/g), așa că haideți să scriem un driver pentru aceasta." -#: src/bare-metal/aps/uart.md +#: src/bare-metal/aps/uart.md:9 +#, fuzzy msgid "/// Minimal driver for a PL011 UART.\n" -msgstr "" +msgstr "/// Driver minim pentru o UART PL011.\n" -#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md +#: src/bare-metal/aps/uart.md:17 src/bare-metal/aps/better-uart/driver.md:13 +#, fuzzy msgid "" "/// Constructs a new instance of the UART driver for a PL011 device at the\n" " /// given base address.\n" @@ -18175,34 +21619,49 @@ msgid "" "process\n" " /// as device memory and not have any other aliases.\n" msgstr "" +"/// Construiește o nouă instanță a driverului UART pentru un dispozitiv " +"PL011 la nivelul\n" +" /// adresa de bază dată.\n" +" ///\n" +" /// # Siguranță\n" +" ///\n" +" /// Adresa de bază dată trebuie să indice cele 8 registre de control " +"MMIO ale unui dispozitiv de tip\n" +" /// PL011, care trebuie să fie mapate în spațiul de adrese al " +"procesului\n" +" /// ca memorie a dispozitivului și să nu aibă alte pseudonime.\n" -#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md -#: src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/uart.md:29 src/bare-metal/aps/better-uart/driver.md:25 +#, fuzzy msgid "/// Writes a single byte to the UART.\n" -msgstr "" +msgstr "/// Scrie un singur octet pe UART.\n" -#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md -#: src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/uart.md:31 src/bare-metal/aps/better-uart/driver.md:27 +#, fuzzy msgid "// Wait until there is room in the TX buffer.\n" -msgstr "" +msgstr "// Așteptați până când există spațiu în bufferul TX.\n" -#: src/bare-metal/aps/uart.md +#: src/bare-metal/aps/uart.md:34 src/bare-metal/aps/uart.md:46 +#, fuzzy msgid "" "// Safe because we know that the base address points to the control\n" " // registers of a PL011 device which is appropriately mapped.\n" msgstr "" +"// Sigur, deoarece știm că adresa de bază indică controlul\n" +" // registrele de control ale unui dispozitiv PL011 care este mapat " +"corespunzător.\n" -#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md -#: src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/uart.md:37 src/bare-metal/aps/better-uart/driver.md:33 +#, fuzzy msgid "// Write to the TX buffer.\n" -msgstr "" +msgstr "// Scrieți în bufferul TX.\n" -#: src/bare-metal/aps/uart.md src/bare-metal/aps/better-uart/driver.md -#: src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/uart.md:41 src/bare-metal/aps/better-uart/driver.md:37 +#, fuzzy msgid "// Wait until the UART is no longer busy.\n" -msgstr "" +msgstr "// Așteptați până când UART nu mai este ocupată.\n" -#: src/bare-metal/aps/uart.md +#: src/bare-metal/aps/uart.md:55 #, fuzzy msgid "" "Note that `Uart::new` is unsafe while the other methods are safe. This is " @@ -18220,7 +21679,7 @@ msgstr "" "este întotdeauna sigur să apelăm mai târziu `write_byte`, deoarece putem " "presupune condițiile prealabile necesare." -#: src/bare-metal/aps/uart.md +#: src/bare-metal/aps/uart.md:61 #, fuzzy msgid "" "We could have done it the other way around (making `new` safe but " @@ -18231,7 +21690,7 @@ msgstr "" "ar fi fost mult mai puțin convenabil de utilizat, deoarece fiecare loc care " "apelează `write_byte` ar trebui să se gândească la siguranța lui `write_byte`" -#: src/bare-metal/aps/uart.md +#: src/bare-metal/aps/uart.md:64 #, fuzzy msgid "" "This is a common pattern for writing safe wrappers of unsafe code: moving " @@ -18242,12 +21701,12 @@ msgstr "" "nesigur: mutarea sarcinii de a dovedi soliditatea de la un număr mare de " "locuri la un număr mai mic de locuri." -#: src/bare-metal/aps/uart/traits.md +#: src/bare-metal/aps/uart/traits.md:1 #, fuzzy msgid "More traits" msgstr "Mai multe trăsături" -#: src/bare-metal/aps/uart/traits.md +#: src/bare-metal/aps/uart/traits.md:3 #, fuzzy msgid "" "We derived the `Debug` trait. It would be useful to implement a few more " @@ -18256,14 +21715,18 @@ msgstr "" "Am derivat trăsătura `Debug`. Ar fi util să implementăm și alte câteva " "trăsături." -#: src/bare-metal/aps/uart/traits.md src/exercises/bare-metal/rtc.md -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/bare-metal/aps/uart/traits.md:17 +#: src/exercises/bare-metal/solutions-afternoon.md:223 +#, fuzzy msgid "" "// Safe because it just contains a pointer to device memory, which can be\n" "// accessed from any context.\n" msgstr "" +"// Sigur, deoarece conține doar un pointer către memoria dispozitivului, " +"care poate fi\n" +"// accesată din orice context.\n" -#: src/bare-metal/aps/uart/traits.md +#: src/bare-metal/aps/uart/traits.md:25 #, fuzzy msgid "" "Implementing `Write` lets us use the `write!` and `writeln!` macros with our " @@ -18272,7 +21735,7 @@ msgstr "" "Implementarea `Write` ne permite să folosim macrogramele `write!` și " "`writeln!` cu tipul nostru `Uart`." -#: src/bare-metal/aps/uart/traits.md +#: src/bare-metal/aps/uart/traits.md:27 #, fuzzy msgid "" "Run the example in QEMU with `make qemu_minimal` under `src/bare-metal/aps/" @@ -18281,12 +21744,12 @@ msgstr "" "Rulați exemplul în QEMU cu `make qemu_minimal` în `src/bare-metal/aps/" "examples`." -#: src/bare-metal/aps/better-uart.md +#: src/bare-metal/aps/better-uart.md:1 #, fuzzy msgid "A better UART driver" msgstr "Un driver UART mai bun" -#: src/bare-metal/aps/better-uart.md +#: src/bare-metal/aps/better-uart.md:3 #, fuzzy msgid "" "The PL011 actually has [a bunch more registers](https://developer.arm.com/" @@ -18301,182 +21764,155 @@ msgstr "" "predispusă la erori și greu de citit. În plus, unele dintre ele sunt câmpuri " "de biți care ar fi frumos să fie accesate într-un mod structurat." -#: src/bare-metal/aps/better-uart.md +#: src/bare-metal/aps/better-uart.md:7 msgid "Offset" msgstr "Decalaj" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:7 msgid "Register name" msgstr "Nume registru" -#: src/bare-metal/aps/better-uart.md +#: src/bare-metal/aps/better-uart.md:7 msgid "Width" msgstr "Lăţime" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:9 msgid "0x00" msgstr "0x00" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:9 msgid "DR" msgstr "DR" -#: src/bare-metal/aps/better-uart.md +#: src/bare-metal/aps/better-uart.md:9 msgid "12" msgstr "12" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:10 msgid "0x04" msgstr "0x04" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:10 msgid "RSR" msgstr "RSR" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:11 msgid "0x18" msgstr "0x18" -#: src/bare-metal/aps/better-uart.md +#: src/bare-metal/aps/better-uart.md:11 msgid "FR" msgstr "V" -#: src/bare-metal/aps/better-uart.md +#: src/bare-metal/aps/better-uart.md:11 msgid "9" msgstr "9" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:12 msgid "0x20" msgstr "0x20" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:12 msgid "ILPR" msgstr "ILPR" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:13 msgid "0x24" msgstr "0x24" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:13 msgid "IBRD" msgstr "IBRD" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:13 src/bare-metal/aps/better-uart.md:16 msgid "16" msgstr "16" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:14 msgid "0x28" msgstr "0x28" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:14 msgid "FBRD" msgstr "FBRD" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:15 msgid "0x2c" msgstr "0x2c" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:15 msgid "LCR_H" msgstr "LCR_H" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:16 msgid "0x30" msgstr "0x30" -#: src/bare-metal/aps/better-uart.md +#: src/bare-metal/aps/better-uart.md:16 msgid "CR" msgstr "GD" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:17 msgid "0x34" msgstr "0x34" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:17 msgid "IFLS" msgstr "IFLS" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:18 msgid "0x38" msgstr "0x38" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:18 msgid "IMSC" msgstr "IMSC" -#: src/bare-metal/aps/better-uart.md +#: src/bare-metal/aps/better-uart.md:18 src/bare-metal/aps/better-uart.md:19 +#: src/bare-metal/aps/better-uart.md:20 src/bare-metal/aps/better-uart.md:21 msgid "11" msgstr "11" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:19 msgid "0x3c" msgstr "0x3c" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:19 msgid "RIS" msgstr "RIS" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:20 msgid "0x40" msgstr "0x40" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:20 msgid "MIS" msgstr "MIS" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:21 msgid "0x44" msgstr "0x44" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:21 msgid "ICR" msgstr "ICR" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:22 msgid "0x48" msgstr "0x48" -#: src/bare-metal/aps/better-uart.md -#, fuzzy +#: src/bare-metal/aps/better-uart.md:22 msgid "DMACR" msgstr "DMACR" -#: src/bare-metal/aps/better-uart.md +#: src/bare-metal/aps/better-uart.md:26 #, fuzzy msgid "There are also some ID registers which have been omitted for brevity." msgstr "" "Există, de asemenea, unele registre de identificare care au fost omise " "pentru a fi mai scurte." -#: src/bare-metal/aps/better-uart/bitflags.md +#: src/bare-metal/aps/better-uart/bitflags.md:3 #, fuzzy msgid "" "The [`bitflags`](https://crates.io/crates/bitflags) crate is useful for " @@ -18485,47 +21921,57 @@ msgstr "" "Crăiasa [`bitflags`](https://crates.io/crates/bitflags) este utilă pentru a " "lucra cu bitflags." -#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/better-uart/bitflags.md:10 +#, fuzzy msgid "/// Flags from the UART flag register.\n" -msgstr "" +msgstr "/// Semnalizatoare din registrul de semnalizare UART.\n" -#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/better-uart/bitflags.md:14 +#, fuzzy msgid "/// Clear to send.\n" -msgstr "" +msgstr "/// Liber la trimitere.\n" -#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/better-uart/bitflags.md:16 +#, fuzzy msgid "/// Data set ready.\n" -msgstr "" +msgstr "/// Set de date pregătit.\n" -#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/better-uart/bitflags.md:18 +#, fuzzy msgid "/// Data carrier detect.\n" -msgstr "" +msgstr "/// Detectarea purtătorului de date.\n" -#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/better-uart/bitflags.md:20 +#, fuzzy msgid "/// UART busy transmitting data.\n" -msgstr "" +msgstr "/// UART ocupată cu transmiterea de date.\n" -#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/better-uart/bitflags.md:22 +#, fuzzy msgid "/// Receive FIFO is empty.\n" -msgstr "" +msgstr "/// Receive FIFO este gol.\n" -#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/better-uart/bitflags.md:24 +#, fuzzy msgid "/// Transmit FIFO is full.\n" -msgstr "" +msgstr "/// Transmit FIFO este plin.\n" -#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/better-uart/bitflags.md:26 +#, fuzzy msgid "/// Receive FIFO is full.\n" -msgstr "" +msgstr "/// Receive FIFO este plin.\n" -#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/better-uart/bitflags.md:28 +#, fuzzy msgid "/// Transmit FIFO is empty.\n" -msgstr "" +msgstr "/// Transmit FIFO este gol.\n" -#: src/bare-metal/aps/better-uart/bitflags.md src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/better-uart/bitflags.md:30 +#, fuzzy msgid "/// Ring indicator.\n" -msgstr "" +msgstr "/// Indicator de inel.\n" -#: src/bare-metal/aps/better-uart/bitflags.md +#: src/bare-metal/aps/better-uart/bitflags.md:38 #, fuzzy msgid "" "The `bitflags!` macro creates a newtype something like `Flags(u16)`, along " @@ -18534,12 +21980,12 @@ msgstr "" "Macroul `bitflags!` creează un nou tip, ceva de genul `Flags(u16)`, împreună " "cu o serie de implementări de metode pentru a obține și seta steaguri." -#: src/bare-metal/aps/better-uart/registers.md +#: src/bare-metal/aps/better-uart/registers.md:1 #, fuzzy msgid "Multiple registers" msgstr "Registre multiple" -#: src/bare-metal/aps/better-uart/registers.md +#: src/bare-metal/aps/better-uart/registers.md:3 #, fuzzy msgid "" "We can use a struct to represent the memory layout of the UART's registers." @@ -18547,7 +21993,7 @@ msgstr "" "Putem folosi o structură pentru a reprezenta structura de memorie a " "registrelor UART." -#: src/bare-metal/aps/better-uart/registers.md +#: src/bare-metal/aps/better-uart/registers.md:43 #, fuzzy msgid "" "[`#[repr(C)]`](https://doc.rust-lang.org/reference/type-layout.html#the-c-" @@ -18563,32 +22009,43 @@ msgstr "" "implicită Rust permite compilatorului (printre altele) să reordoneze " "câmpurile după cum crede de cuviință." -#: src/bare-metal/aps/better-uart/driver.md +#: src/bare-metal/aps/better-uart/driver.md:3 #, fuzzy msgid "Now let's use the new `Registers` struct in our driver." msgstr "Acum să folosim noua structură `Registers` în driverul nostru." -#: src/bare-metal/aps/better-uart/driver.md +#: src/bare-metal/aps/better-uart/driver.md:6 +#, fuzzy msgid "/// Driver for a PL011 UART.\n" -msgstr "" +msgstr "/// Driver pentru o UART PL011.\n" -#: src/bare-metal/aps/better-uart/driver.md src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/better-uart/driver.md:30 +#: src/bare-metal/aps/better-uart/driver.md:54 +#, fuzzy msgid "" "// Safe because we know that self.registers points to the control\n" " // registers of a PL011 device which is appropriately mapped.\n" msgstr "" +"// Sigur, deoarece știm că self.registers indică controlul\n" +" // registre ale unui dispozitiv PL011 care este mapat în mod " +"corespunzător.\n" -#: src/bare-metal/aps/better-uart/driver.md src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/better-uart/driver.md:41 +#, fuzzy msgid "" "/// Reads and returns a pending byte, or `None` if nothing has been\n" " /// received.\n" msgstr "" +"/// Citește și returnează un octet în așteptare, sau `None` dacă nu a fost " +"nimic\n" +" /// primit.\n" -#: src/bare-metal/aps/better-uart/driver.md src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/better-uart/driver.md:48 +#, fuzzy msgid "// TODO: Check for error conditions in bits 8-11.\n" -msgstr "" +msgstr "// TODO: Verificați dacă există condiții de eroare în biții 8-11.\n" -#: src/bare-metal/aps/better-uart/driver.md +#: src/bare-metal/aps/better-uart/driver.md:63 #, fuzzy msgid "" "Note the use of `addr_of!` / `addr_of_mut!` to get pointers to individual " @@ -18598,12 +22055,13 @@ msgstr "" "la câmpuri individuale fără a crea o referință intermediară, ceea ce ar fi " "nesigur." -#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md +#: src/bare-metal/aps/better-uart/using.md:1 +#: src/bare-metal/aps/logging/using.md:1 #, fuzzy msgid "Using it" msgstr "Folosirea Cargo" -#: src/bare-metal/aps/better-uart/using.md +#: src/bare-metal/aps/better-uart/using.md:3 #, fuzzy msgid "" "Let's write a small program using our driver to write to the serial console, " @@ -18612,41 +22070,53 @@ msgstr "" "Să scriem un mic program care utilizează driverul nostru pentru a scrie pe " "consola serială și pentru a reda ecourile octeților care intră." -#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md -#: src/exercises/bare-metal/rtc.md -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/bare-metal/aps/better-uart/using.md:19 +#: src/bare-metal/aps/logging/using.md:18 +#: src/exercises/bare-metal/solutions-afternoon.md:33 +#, fuzzy msgid "/// Base address of the primary PL011 UART.\n" -msgstr "" +msgstr "/// Adresa de bază a UART PL011 primară.\n" -#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md -#: src/exercises/bare-metal/rtc.md -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/bare-metal/aps/better-uart/using.md:25 +#: src/bare-metal/aps/logging/using.md:24 +#: src/exercises/bare-metal/solutions-afternoon.md:44 +#, fuzzy msgid "" "// Safe because `PL011_BASE_ADDRESS` is the base address of a PL011 device,\n" " // and nothing else accesses that address range.\n" msgstr "" +"// Sigur, deoarece `PL011_BASE_ADDRESS` este adresa de bază a unui " +"dispozitiv PL011,\n" +" // și nimic altceva nu accesează acest interval de adrese.\n" -#: src/bare-metal/aps/better-uart/using.md src/bare-metal/aps/logging/using.md +#: src/bare-metal/aps/better-uart/using.md:29 +#: src/bare-metal/aps/logging/using.md:29 +#, fuzzy msgid "\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\"" -msgstr "" +msgstr "\"main({x0:#x}, {x1:#x}, {x2:#x}, {x3:#x})\"" -#: src/bare-metal/aps/better-uart/using.md +#: src/bare-metal/aps/better-uart/using.md:35 +#, fuzzy msgid "b'\\r'" -msgstr "" +msgstr "b'\\r'" -#: src/bare-metal/aps/better-uart/using.md src/async/pitfalls/cancellation.md +#: src/bare-metal/aps/better-uart/using.md:36 +#: src/async/pitfalls/cancellation.md:27 +#, fuzzy msgid "b'\\n'" -msgstr "" +msgstr "b'\\n'" -#: src/bare-metal/aps/better-uart/using.md +#: src/bare-metal/aps/better-uart/using.md:38 +#, fuzzy msgid "b'q'" -msgstr "" +msgstr "b'q'" -#: src/bare-metal/aps/better-uart/using.md +#: src/bare-metal/aps/better-uart/using.md:44 +#, fuzzy msgid "\"Bye!\"" -msgstr "" +msgstr "\"La revedere!\"" -#: src/bare-metal/aps/better-uart/using.md +#: src/bare-metal/aps/better-uart/using.md:51 #, fuzzy msgid "" "As in the [inline assembly](../inline-assembly.md) example, this `main` " @@ -18657,14 +22127,14 @@ msgstr "" "`main` este apelată din codul punctului de intrare în `entry.S`. Pentru " "detalii, consultați notele vorbitorului de acolo." -#: src/bare-metal/aps/better-uart/using.md +#: src/bare-metal/aps/better-uart/using.md:54 #, fuzzy msgid "" "Run the example in QEMU with `make qemu` under `src/bare-metal/aps/examples`." msgstr "" "Rulați exemplul în QEMU cu `make qemu` în `src/bare-metal/aps/examples`." -#: src/bare-metal/aps/logging.md +#: src/bare-metal/aps/logging.md:3 #, fuzzy msgid "" "It would be nice to be able to use the logging macros from the [`log`]" @@ -18675,15 +22145,17 @@ msgstr "" "crates.io/crates/log) crate. Putem face acest lucru prin implementarea " "trăsăturii `Log`." -#: src/bare-metal/aps/logging.md src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/logging.md:26 +#, fuzzy msgid "\"[{}] {}\"" -msgstr "" +msgstr "\"[{}] {}\"" -#: src/bare-metal/aps/logging.md src/exercises/bare-metal/rtc.md +#: src/bare-metal/aps/logging.md:35 +#, fuzzy msgid "/// Initialises UART logger.\n" -msgstr "" +msgstr "/// Inițializează loggerul UART.\n" -#: src/bare-metal/aps/logging.md +#: src/bare-metal/aps/logging.md:48 #, fuzzy msgid "" "The unwrap in `log` is safe because we initialise `LOGGER` before calling " @@ -18692,24 +22164,25 @@ msgstr "" "Desfășurarea în `log` este sigură deoarece inițializăm `LOGGER` înainte de a " "apela `set_logger`." -#: src/bare-metal/aps/logging/using.md +#: src/bare-metal/aps/logging/using.md:3 #, fuzzy msgid "We need to initialise the logger before we use it." msgstr "Trebuie să inițializăm loggerul înainte de a-l utiliza." -#: src/bare-metal/aps/logging/using.md src/exercises/bare-metal/rtc.md -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/bare-metal/aps/logging/using.md:38 +#: src/exercises/bare-metal/solutions-afternoon.md:115 +#, fuzzy msgid "\"{info}\"" -msgstr "" +msgstr "\"{info}\"" -#: src/bare-metal/aps/logging/using.md +#: src/bare-metal/aps/logging/using.md:46 #, fuzzy msgid "Note that our panic handler can now log details of panics." msgstr "" "Rețineți că gestionarul nostru de panică poate acum să înregistreze " "detaliile panicii." -#: src/bare-metal/aps/logging/using.md +#: src/bare-metal/aps/logging/using.md:47 #, fuzzy msgid "" "Run the example in QEMU with `make qemu_logger` under `src/bare-metal/aps/" @@ -18718,7 +22191,7 @@ msgstr "" "Rulați exemplul în QEMU cu `make qemu_logger` în `src/bare-metal/aps/" "examples`." -#: src/bare-metal/aps/exceptions.md +#: src/bare-metal/aps/exceptions.md:3 #, fuzzy msgid "" "AArch64 defines an exception vector table with 16 entries, for 4 types of " @@ -18733,14 +22206,14 @@ msgstr "" "AArch32). Implementăm acest lucru în asamblare pentru a salva registrele " "volatile pe stivă înainte de a apela în codul Rust:" -#: src/bare-metal/aps/exceptions.md +#: src/bare-metal/aps/exceptions.md:67 #, fuzzy msgid "EL is exception level; all our examples this afternoon run in EL1." msgstr "" "EL reprezintă nivelul de excepție; toate exemplele noastre din această după-" "amiază rulează în EL1." -#: src/bare-metal/aps/exceptions.md +#: src/bare-metal/aps/exceptions.md:68 #, fuzzy msgid "" "For simplicity we aren't distinguishing between SP0 and SPx for the current " @@ -18749,7 +22222,7 @@ msgstr "" "Pentru simplificare, nu facem distincție între SP0 și SPx pentru excepțiile " "EL curente, sau între AArch32 și AArch64 pentru excepțiile EL inferioare." -#: src/bare-metal/aps/exceptions.md +#: src/bare-metal/aps/exceptions.md:70 #, fuzzy msgid "" "For this example we just log the exception and power down, as we don't " @@ -18758,7 +22231,7 @@ msgstr "" "Pentru acest exemplu, ne limităm la înregistrarea excepției și la oprirea " "alimentării, deoarece nu ne așteptăm ca vreuna dintre acestea să se întâmple." -#: src/bare-metal/aps/exceptions.md +#: src/bare-metal/aps/exceptions.md:72 #, fuzzy msgid "" "We can think of exception handlers and our main execution context more or " @@ -18776,27 +22249,27 @@ msgstr "" "programului, iar aceasta este `Send`, dar nu `Sync`, atunci va trebui să o " "înfășurăm în ceva de genul `Mutex` și să o punem într-o statică." -#: src/bare-metal/aps/other-projects.md +#: src/bare-metal/aps/other-projects.md:3 #, fuzzy msgid "[oreboot](https://github.com/oreboot/oreboot)" msgstr "[oreboot](https://github.com/oreboot/oreboot)" -#: src/bare-metal/aps/other-projects.md +#: src/bare-metal/aps/other-projects.md:4 #, fuzzy msgid "\"coreboot without the C\"" msgstr "\"coreboot fără C\"" -#: src/bare-metal/aps/other-projects.md +#: src/bare-metal/aps/other-projects.md:5 #, fuzzy msgid "Supports x86, aarch64 and RISC-V." msgstr "Suportă x86, aarch64 și RISC-V." -#: src/bare-metal/aps/other-projects.md +#: src/bare-metal/aps/other-projects.md:6 #, fuzzy msgid "Relies on LinuxBoot rather than having many drivers itself." msgstr "Se bazează pe LinuxBoot în loc să aibă multe drivere." -#: src/bare-metal/aps/other-projects.md +#: src/bare-metal/aps/other-projects.md:7 #, fuzzy msgid "" "[Rust RaspberryPi OS tutorial](https://github.com/rust-embedded/rust-" @@ -18805,7 +22278,7 @@ msgstr "" "[Tutorial Rust RaspberryPi OS](https://github.com/rust-embedded/rust-" "raspberrypi-OS-tutorials)" -#: src/bare-metal/aps/other-projects.md +#: src/bare-metal/aps/other-projects.md:8 #, fuzzy msgid "" "Initialisation, UART driver, simple bootloader, JTAG, exception levels, " @@ -18814,7 +22287,7 @@ msgstr "" "Inițializare, driver UART, bootloader simplu, JTAG, niveluri de excepție, " "tratarea excepțiilor, tabele de pagini" -#: src/bare-metal/aps/other-projects.md +#: src/bare-metal/aps/other-projects.md:10 #, fuzzy msgid "" "Some dodginess around cache maintenance and initialisation in Rust, not " @@ -18823,17 +22296,17 @@ msgstr "" "Unele dificultăți în ceea ce privește întreținerea și inițializarea cache-" "ului în Rust, nu neapărat un exemplu bun de copiat pentru codul de producție." -#: src/bare-metal/aps/other-projects.md +#: src/bare-metal/aps/other-projects.md:12 #, fuzzy msgid "[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)" msgstr "[`cargo-call-stack`](https://crates.io/crates/cargo-call-stack)" -#: src/bare-metal/aps/other-projects.md +#: src/bare-metal/aps/other-projects.md:13 #, fuzzy msgid "Static analysis to determine maximum stack usage." msgstr "Analiza statică pentru a determina utilizarea maximă a stivei." -#: src/bare-metal/aps/other-projects.md +#: src/bare-metal/aps/other-projects.md:17 #, fuzzy msgid "" "The RaspberryPi OS tutorial runs Rust code before the MMU and caches are " @@ -18843,7 +22316,7 @@ msgstr "" "să fie activate. Aceasta va citi și va scrie în memorie (de exemplu, stiva). " "Cu toate acestea:" -#: src/bare-metal/aps/other-projects.md +#: src/bare-metal/aps/other-projects.md:19 #, fuzzy msgid "" "Without the MMU and cache, unaligned accesses will fault. It builds with " @@ -18856,7 +22329,7 @@ msgstr "" "compilatorul să genereze accese nealiniate, deci ar trebui să fie în regulă, " "dar acest lucru nu este neapărat valabil în general." -#: src/bare-metal/aps/other-projects.md +#: src/bare-metal/aps/other-projects.md:23 #, fuzzy msgid "" "If it were running in a VM, this can lead to cache coherency issues. The " @@ -18877,11 +22350,11 @@ msgstr "" "particular (care rulează direct pe hardware fără hipervizor), dar nu este un " "model bun în general." -#: src/bare-metal/useful-crates.md +#: src/bare-metal/useful-crates.md:1 msgid "Useful crates" msgstr "Lăzi (crates) utile" -#: src/bare-metal/useful-crates.md +#: src/bare-metal/useful-crates.md:3 #, fuzzy msgid "" "We'll go over a few crates which solve some common problems in bare-metal " @@ -18890,7 +22363,7 @@ msgstr "" "Vom trece în revistă câteva crates care rezolvă unele probleme comune în " "programarea bare-metal." -#: src/bare-metal/useful-crates/zerocopy.md +#: src/bare-metal/useful-crates/zerocopy.md:3 #, fuzzy msgid "" "The [`zerocopy`](https://docs.rs/zerocopy/) crate (from Fuchsia) provides " @@ -18901,7 +22374,7 @@ msgstr "" "trăsături și macro-uri pentru conversia în siguranță între secvențe de " "octeți și alte tipuri." -#: src/bare-metal/useful-crates/zerocopy.md +#: src/bare-metal/useful-crates/zerocopy.md:42 #, fuzzy msgid "" "This is not suitable for MMIO (as it doesn't use volatile reads and writes), " @@ -18913,7 +22386,7 @@ msgstr "" "hardware, de exemplu prin DMA, sau trimise prin intermediul unei interfețe " "externe." -#: src/bare-metal/useful-crates/zerocopy.md +#: src/bare-metal/useful-crates/zerocopy.md:48 #, fuzzy msgid "" "`FromBytes` can be implemented for types for which any byte pattern is " @@ -18923,7 +22396,7 @@ msgstr "" "octeți este valabil și, prin urmare, poate fi convertit în siguranță dintr-o " "secvență de octeți nesigură." -#: src/bare-metal/useful-crates/zerocopy.md +#: src/bare-metal/useful-crates/zerocopy.md:50 #, fuzzy msgid "" "Attempting to derive `FromBytes` for these types would fail, because " @@ -18934,7 +22407,7 @@ msgstr "" "`RequestType` nu utilizează toate valorile u32 posibile ca discriminanți, " "astfel încât nu toate modelele de octeți sunt valide." -#: src/bare-metal/useful-crates/zerocopy.md +#: src/bare-metal/useful-crates/zerocopy.md:53 #, fuzzy msgid "" "`zerocopy::byteorder` has types for byte-order aware numeric primitives." @@ -18942,7 +22415,7 @@ msgstr "" "`zerocopy::byteorder` are tipuri pentru primitive numerice care cunosc " "ordinea octeților." -#: src/bare-metal/useful-crates/zerocopy.md +#: src/bare-metal/useful-crates/zerocopy.md:54 #, fuzzy msgid "" "Run the example with `cargo run` under `src/bare-metal/useful-crates/" @@ -18952,7 +22425,7 @@ msgstr "" "Rulați exemplul cu `cargo run` în `src/bare-metal/useful-crates/zerocopy-" "example/`. (Nu va rula în Playground din cauza dependenței de crate)" -#: src/bare-metal/useful-crates/aarch64-paging.md +#: src/bare-metal/useful-crates/aarch64-paging.md:3 #, fuzzy msgid "" "The [`aarch64-paging`](https://crates.io/crates/aarch64-paging) crate lets " @@ -18963,19 +22436,23 @@ msgstr "" "permite să creați tabele de pagini în conformitate cu arhitectura sistemului " "de memorie virtuală AArch64." -#: src/bare-metal/useful-crates/aarch64-paging.md +#: src/bare-metal/useful-crates/aarch64-paging.md:14 +#, fuzzy msgid "// Create a new page table with identity mapping.\n" -msgstr "" +msgstr "// Creați o nouă tabelă de pagini cu corespondență de identitate.\n" -#: src/bare-metal/useful-crates/aarch64-paging.md +#: src/bare-metal/useful-crates/aarch64-paging.md:16 +#, fuzzy msgid "// Map a 2 MiB region of memory as read-only.\n" msgstr "" +"// Maparea unei regiuni de 2 MiB de memorie ca fiind numai pentru citire.\n" -#: src/bare-metal/useful-crates/aarch64-paging.md +#: src/bare-metal/useful-crates/aarch64-paging.md:21 +#, fuzzy msgid "// Set `TTBR0_EL1` to activate the page table.\n" -msgstr "" +msgstr "// Setați `TTBR0_EL1` pentru a activa tabelul de pagini.\n" -#: src/bare-metal/useful-crates/aarch64-paging.md +#: src/bare-metal/useful-crates/aarch64-paging.md:28 #, fuzzy msgid "" "For now it only supports EL1, but support for other exception levels should " @@ -18984,7 +22461,7 @@ msgstr "" "Deocamdată, acceptă doar EL1, dar ar trebui să fie ușor de adăugat suportul " "pentru alte niveluri de excepție." -#: src/bare-metal/useful-crates/aarch64-paging.md +#: src/bare-metal/useful-crates/aarch64-paging.md:30 #, fuzzy msgid "" "This is used in Android for the [Protected VM Firmware](https://cs.android." @@ -18995,7 +22472,7 @@ msgstr "" "android.com/android/platform/superproject/+/master:packages/modules/" "Virtualization/pvmfw/)." -#: src/bare-metal/useful-crates/aarch64-paging.md +#: src/bare-metal/useful-crates/aarch64-paging.md:31 #, fuzzy msgid "" "There's no easy way to run this example, as it needs to run on real hardware " @@ -19004,7 +22481,7 @@ msgstr "" "Nu există o modalitate ușoară de a rula acest exemplu, deoarece trebuie să " "ruleze pe hardware real sau în QEMU." -#: src/bare-metal/useful-crates/buddy_system_allocator.md +#: src/bare-metal/useful-crates/buddy_system_allocator.md:3 #, fuzzy msgid "" "[`buddy_system_allocator`](https://crates.io/crates/buddy_system_allocator) " @@ -19026,12 +22503,12 @@ msgstr "" "alocarea altor spații de adrese. De exemplu, am putea dori să alocăm spațiu " "MMIO pentru BAR-uri PCI:" -#: src/bare-metal/useful-crates/buddy_system_allocator.md +#: src/bare-metal/useful-crates/buddy_system_allocator.md:29 #, fuzzy msgid "PCI BARs always have alignment equal to their size." msgstr "BAR-urile PCI au întotdeauna o aliniere egală cu dimensiunea lor." -#: src/bare-metal/useful-crates/buddy_system_allocator.md +#: src/bare-metal/useful-crates/buddy_system_allocator.md:30 #, fuzzy msgid "" "Run the example with `cargo run` under `src/bare-metal/useful-crates/" @@ -19041,7 +22518,7 @@ msgstr "" "Rulați exemplul cu `cargo run` în `src/bare-metal/useful-crates/allocator-" "example/`. (Nu va rula în Playground din cauza dependenței de crate)" -#: src/bare-metal/useful-crates/tinyvec.md +#: src/bare-metal/useful-crates/tinyvec.md:3 #, fuzzy msgid "" "Sometimes you want something which can be resized like a `Vec`, but without " @@ -19056,7 +22533,7 @@ msgstr "" "pe stivă, care ține evidența numărului de elemente utilizate și intră în " "panică dacă încercați să utilizați mai multe decât sunt alocate." -#: src/bare-metal/useful-crates/tinyvec.md +#: src/bare-metal/useful-crates/tinyvec.md:25 #, fuzzy msgid "" "`tinyvec` requires that the element type implement `Default` for " @@ -19065,14 +22542,14 @@ msgstr "" "`tinyvec` necesită ca tipul de element să implementeze `Default` pentru " "inițializare." -#: src/bare-metal/useful-crates/tinyvec.md +#: src/bare-metal/useful-crates/tinyvec.md:27 #, fuzzy msgid "" "The Rust Playground includes `tinyvec`, so this example will run fine inline." msgstr "" "Rust Playground include `tinyvec`, deci acest exemplu va rula bine în linie." -#: src/bare-metal/useful-crates/spin.md +#: src/bare-metal/useful-crates/spin.md:3 #, fuzzy msgid "" "`std::sync::Mutex` and the other synchronisation primitives from `std::sync` " @@ -19084,7 +22561,7 @@ msgstr "" "mutabilitatea interioară, cum ar fi pentru partajarea stării între diferite " "unități centrale de procesare?" -#: src/bare-metal/useful-crates/spin.md +#: src/bare-metal/useful-crates/spin.md:7 #, fuzzy msgid "" "The [`spin`](https://crates.io/crates/spin) crate provides spinlock-based " @@ -19093,14 +22570,14 @@ msgstr "" "Crăiasa [`spin`](https://crates.io/crates/spin) oferă echivalente bazate pe " "spinlock pentru multe dintre aceste primitive." -#: src/bare-metal/useful-crates/spin.md +#: src/bare-metal/useful-crates/spin.md:26 #, fuzzy msgid "Be careful to avoid deadlock if you take locks in interrupt handlers." msgstr "" "Aveți grijă să evitați blocajul dacă luați blocaje în gestionarii de " "întreruperi." -#: src/bare-metal/useful-crates/spin.md +#: src/bare-metal/useful-crates/spin.md:27 #, fuzzy msgid "" "`spin` also has a ticket lock mutex implementation; equivalents of `RwLock`, " @@ -19110,7 +22587,7 @@ msgstr "" "echivalenți ai lui `RwLock`, `Barrier` și `Once` din `std::sync`; și `Lazy` " "pentru inițializare leneșă." -#: src/bare-metal/useful-crates/spin.md +#: src/bare-metal/useful-crates/spin.md:29 #, fuzzy msgid "" "The [`once_cell`](https://crates.io/crates/once_cell) crate also has some " @@ -19121,7 +22598,7 @@ msgstr "" "câteva tipuri utile pentru inițializarea târzie cu o abordare ușor diferită " "de `spin::once::Once`." -#: src/bare-metal/useful-crates/spin.md +#: src/bare-metal/useful-crates/spin.md:31 #, fuzzy msgid "" "The Rust Playground includes `spin`, so this example will run fine inline." @@ -19129,7 +22606,7 @@ msgstr "" "Rust Playground include `spin`, astfel că acest exemplu va rula fără " "probleme în linie." -#: src/bare-metal/android.md +#: src/bare-metal/android.md:3 #, fuzzy msgid "" "To build a bare-metal Rust binary in AOSP, you need to use a " @@ -19143,11 +22620,11 @@ msgstr "" "și apoi un `raw_binary` pentru a converti ELF-ul într-un binar brut gata de " "a fi rulat." -#: src/bare-metal/android/vmbase.md +#: src/bare-metal/android/vmbase.md:1 msgid "vmbase" msgstr "vmbase" -#: src/bare-metal/android/vmbase.md +#: src/bare-metal/android/vmbase.md:3 #, fuzzy msgid "" "For VMs running under crosvm on aarch64, the [vmbase](https://android." @@ -19161,7 +22638,7 @@ msgstr "" "valori implicite utile pentru regulile de compilare, împreună cu un punct de " "intrare, logare a consolei UART și multe altele." -#: src/bare-metal/android/vmbase.md +#: src/bare-metal/android/vmbase.md:24 #, fuzzy msgid "" "The `main!` macro marks your main function, to be called from the `vmbase` " @@ -19170,7 +22647,7 @@ msgstr "" "Macroul `main!` marchează funcția principală, care va fi apelată din punctul " "de intrare `vmbase`." -#: src/bare-metal/android/vmbase.md +#: src/bare-metal/android/vmbase.md:26 #, fuzzy msgid "" "The `vmbase` entry point handles console initialisation, and issues a " @@ -19179,27 +22656,27 @@ msgstr "" "Punctul de intrare `vmbase` se ocupă de inițializarea consolei și emite un " "PSCI_SYSTEM_OFF pentru a închide VM dacă funcția principală se întoarce." -#: src/exercises/bare-metal/afternoon.md +#: src/exercises/bare-metal/afternoon.md:3 #, fuzzy msgid "We will write a driver for the PL031 real-time clock device." msgstr "Vom scrie un driver pentru dispozitivul de ceas în timp real PL031." -#: src/exercises/bare-metal/afternoon.md src/exercises/concurrency/afternoon.md -#, fuzzy +#: src/exercises/bare-metal/afternoon.md:7 +#: src/exercises/concurrency/afternoon.md:13 msgid "" "After looking at the exercises, you can look at the [solutions](solutions-" "afternoon.md) provided." msgstr "" -"După ce ați studiat exercițiile, puteți consulta [soluții](solutions-" +"După ce ați studiat exercițiile, puteți consulta [soluțiile](solutions-" "afternoon.md) furnizate." -#: src/exercises/bare-metal/rtc.md -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/rtc.md:1 +#: src/exercises/bare-metal/solutions-afternoon.md:3 #, fuzzy msgid "RTC driver" -msgstr "Driver RTC" +msgstr "Conductor RTC" -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:3 #, fuzzy msgid "" "The QEMU aarch64 virt machine has a [PL031](https://developer.arm.com/" @@ -19210,7 +22687,7 @@ msgstr "" "developer.arm.com/documentation/ddi0224/c) la 0x9010000. Pentru acest " "exercițiu, trebuie să scrieți un driver pentru acesta." -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:6 #, fuzzy msgid "" "Use it to print the current time to the serial console. You can use the " @@ -19220,7 +22697,7 @@ msgstr "" "crate-ul [`chrono`](https://crates.io/crates/chrono) pentru formatarea datei/" "orei." -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:8 #, fuzzy msgid "" "Use the match register and raw interrupt status to busy-wait until a given " @@ -19232,7 +22709,7 @@ msgstr "" "(Chemați [`core::hint::spin_loop`](https://doc.rust-lang.org/core/hint/fn." "spin_loop.html) în interiorul buclei)" -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:11 #, fuzzy msgid "" "_Extension if you have time:_ Enable and handle the interrupt generated by " @@ -19244,13 +22721,13 @@ msgstr "" "docs.rs/arm-gic/) pentru a configura controlerul generic de întreruperi Arm " "Generic Interrupt Controller." -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:14 #, fuzzy msgid "Use the RTC interrupt, which is wired to the GIC as `IntId::spi(2)`." msgstr "" "Utilizați întreruperea RTC, care este conectată la GIC ca `IntId::spi(2)`." -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:15 #, fuzzy msgid "" "Once the interrupt is enabled, you can put the core to sleep via `arm_gic::" @@ -19260,7 +22737,7 @@ msgstr "" "prin intermediul `arm_gic::wfi()`, ceea ce va face ca nucleul să doarmă până " "când va primi o întrerupere." -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:19 #, fuzzy msgid "" "Download the [exercise template](../../comprehensive-rust-exercises.zip) and " @@ -19269,33 +22746,7 @@ msgstr "" "Descărcați [șablonul de exerciții] (../../comprehensive-rust-exercises.zip) " "și căutați în directorul `rtc` următoarele fișiere." -#: src/exercises/bare-metal/rtc.md -#: src/exercises/bare-metal/solutions-afternoon.md -msgid "/// Base addresses of the GICv3.\n" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -#: src/exercises/bare-metal/solutions-afternoon.md -msgid "\"main({:#x}, {:#x}, {:#x}, {:#x})\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -#: src/exercises/bare-metal/solutions-afternoon.md -msgid "" -"// Safe because `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/rtc.md -msgid "// TODO: Create instance of RTC driver and print current time.\n" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "// TODO: Wait for 3 seconds.\n" -msgstr "" - -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:79 #, fuzzy msgid "" "_src/exceptions.rs_ (you should only need to change this for the 3rd part of " @@ -19304,1412 +22755,194 @@ msgstr "" "_src/exceptions.rs_ (ar trebui să fie nevoie să modificați acest lucru doar " "pentru a treia parte a exercițiului):" -#: src/exercises/bare-metal/rtc.md -#, fuzzy -msgid "" -"// Copyright 2023 Google LLC\n" -"//\n" -"// Licensed under the Apache License, Version 2.0 (the \"License\");\n" -"// you may not use this file except in compliance with the License.\n" -"// You may obtain a copy of the License at\n" -"//\n" -"// http://www.apache.org/licenses/LICENSE-2.0\n" -"//\n" -"// Unless required by applicable law or agreed to in writing, software\n" -"// distributed under the License is distributed on an \"AS IS\" BASIS,\n" -"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" -"// See the License for the specific language governing permissions and\n" -"// limitations under the License.\n" -msgstr "" -"```rust,compile_fail\n" -"// Copyright 2023 Google LLC\n" -"//\n" -"// Licențiat sub Licența Apache, versiunea 2.0 (denumită în continuare " -"\"Licența\");\n" -"// nu aveți voie să utilizați acest fișier decât în conformitate cu " -"Licența.\n" -"// Puteți obține o copie a Licenței la adresa\n" -"//\n" -"// http://www.apache.org/licenses/LICENSE-2.0\n" -"//\n" -"// Cu excepția cazului în care legea aplicabilă o impune sau se convine în " -"scris, software-ul\n" -"// distribuit în temeiul licenței este distribuit pe o BAZĂ \"AS IS\",\n" -"// FĂRĂ GARANȚII SAU CONDIȚII DE NICI UN FEL, fie ele exprese sau " -"implicite.\n" -"// Consultați Licența pentru limbajul specific care reglementează " -"permisiunile și\n" -"// limitări în cadrul Licenței.\n" -"\n" -"utilizați cc::Build;\n" -"use std::env;\n" -"\n" -"fn main() {\n" -" #[cfg(target_os = \"linux\")]]\n" -" env::set_var(\"CROSS_COMPILE\", \"aarch64-linux-gnu\");\n" -" #[cfg(not(target_os = \"linux\"))]]\n" -" env::set_var(\"CROSS_COMPILE\", \"aarch64-none-elf\");\n" -"\n" -" Build::new()\n" -" .file(\"entry.S\")\n" -" .file(\"exceptions.S\")\n" -" .file(\"idmap.S\")\n" -" .compile(\"empty\")\n" -"}\n" -"```" - -#: src/exercises/bare-metal/rtc.md -msgid "\"sync_exception_current\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "\"irq_current\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "\"No pending interrupt\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "\"IRQ {intid:?}\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "\"fiq_current\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "\"serr_current\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "\"sync_lower\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "\"irq_lower\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "\"fiq_lower\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "\"serr_lower\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:156 #, fuzzy msgid "_src/logger.rs_ (you shouldn't need to change this):" msgstr "" "_src/logger.rs_ (nu ar trebui să fie nevoie să modificați acest lucru):" -#: src/exercises/bare-metal/rtc.md -msgid "// ANCHOR: main\n" -msgstr "" - -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:216 #, fuzzy msgid "_src/pl011.rs_ (you shouldn't need to change this):" msgstr "_src/pl011.rs_ (nu ar trebui să fie nevoie să modificați acest lucru):" -#: src/exercises/bare-metal/rtc.md -msgid "// ANCHOR: Flags\n" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "// ANCHOR_END: Flags\n" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "" -"/// Flags from the UART Receive Status Register / Error Clear Register.\n" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "/// Framing error.\n" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "/// Parity error.\n" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "/// Break error.\n" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "/// Overrun error.\n" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "// ANCHOR: Registers\n" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "// ANCHOR_END: Registers\n" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "" -"// ANCHOR: Uart\n" -"/// Driver for a PL011 UART.\n" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "" -"/// Constructs a new instance of the UART driver for a PL011 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" -" /// PL011 device, which must be mapped into the address space of the " -"process\n" -" /// as device memory and not have any other aliases.\n" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "// ANCHOR_END: Uart\n" -msgstr "" - -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:417 #, fuzzy msgid "_build.rs_ (you shouldn't need to change this):" msgstr "_build.rs_ (nu ar trebui să fie nevoie să modificați acest lucru):" -#: src/exercises/bare-metal/rtc.md -msgid "\"linux\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "\"CROSS_COMPILE\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -#, fuzzy -msgid "\"aarch64-linux-gnu\"" -msgstr "aarch64-paging" - -#: src/exercises/bare-metal/rtc.md -msgid "\"aarch64-none-elf\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "\"entry.S\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -#, fuzzy -msgid "\"exceptions.S\"" -msgstr "Excepții" - -#: src/exercises/bare-metal/rtc.md -msgid "\"idmap.S\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "\"empty\"" -msgstr "" - -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:454 #, fuzzy msgid "_entry.S_ (you shouldn't need to change this):" msgstr "_entry.S_ (nu ar trebui să fie nevoie să modificați acest lucru):" -#: src/exercises/bare-metal/rtc.md -#, fuzzy -msgid "" -"```armasm\n" -"/*\n" -" * Copyright 2023 Google LLC\n" -" *\n" -" * Licensed under the Apache License, Version 2.0 (the \"License\");\n" -" * you may not use this file except in compliance with the License.\n" -" * You may obtain a copy of the License at\n" -" *\n" -" * https://www.apache.org/licenses/LICENSE-2.0\n" -" *\n" -" * Unless required by applicable law or agreed to in writing, software\n" -" * distributed under the License is distributed on an \"AS IS\" BASIS,\n" -" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" -" * See the License for the specific language governing permissions and\n" -" * limitations under the License.\n" -" */\n" -"\n" -".macro adr_l, reg:req, sym:req\n" -"\tadrp \\reg, \\sym\n" -"\tadd \\reg, \\reg, :lo12:\\sym\n" -".endm\n" -"\n" -".macro mov_i, reg:req, imm:req\n" -"\tmovz \\reg, :abs_g3:\\imm\n" -"\tmovk \\reg, :abs_g2_nc:\\imm\n" -"\tmovk \\reg, :abs_g1_nc:\\imm\n" -"\tmovk \\reg, :abs_g0_nc:\\imm\n" -".endm\n" -"\n" -".set .L_MAIR_DEV_nGnRE,\t0x04\n" -".set .L_MAIR_MEM_WBWA,\t0xff\n" -".set .Lmairval, .L_MAIR_DEV_nGnRE | (.L_MAIR_MEM_WBWA << 8)\n" -"\n" -"/* 4 KiB granule size for TTBR0_EL1. */\n" -".set .L_TCR_TG0_4KB, 0x0 << 14\n" -"/* 4 KiB granule size for TTBR1_EL1. */\n" -".set .L_TCR_TG1_4KB, 0x2 << 30\n" -"/* Disable translation table walk for TTBR1_EL1, generating a translation " -"fault instead. */\n" -".set .L_TCR_EPD1, 0x1 << 23\n" -"/* Translation table walks for TTBR0_EL1 are inner sharable. */\n" -".set .L_TCR_SH_INNER, 0x3 << 12\n" -"/*\n" -" * Translation table walks for TTBR0_EL1 are outer write-back read-allocate " -"write-allocate\n" -" * cacheable.\n" -" */\n" -".set .L_TCR_RGN_OWB, 0x1 << 10\n" -"/*\n" -" * Translation table walks for TTBR0_EL1 are inner write-back read-allocate " -"write-allocate\n" -" * cacheable.\n" -" */\n" -".set .L_TCR_RGN_IWB, 0x1 << 8\n" -"/* Size offset for TTBR0_EL1 is 2**39 bytes (512 GiB). */\n" -".set .L_TCR_T0SZ_512, 64 - 39\n" -".set .Ltcrval, .L_TCR_TG0_4KB | .L_TCR_TG1_4KB | .L_TCR_EPD1 | ." -"L_TCR_RGN_OWB\n" -".set .Ltcrval, .Ltcrval | .L_TCR_RGN_IWB | .L_TCR_SH_INNER | ." -"L_TCR_T0SZ_512\n" -"\n" -"/* Stage 1 instruction access cacheability is unaffected. */\n" -".set .L_SCTLR_ELx_I, 0x1 << 12\n" -"/* SP alignment fault if SP is not aligned to a 16 byte boundary. */\n" -".set .L_SCTLR_ELx_SA, 0x1 << 3\n" -"/* Stage 1 data access cacheability is unaffected. */\n" -".set .L_SCTLR_ELx_C, 0x1 << 2\n" -"/* EL0 and EL1 stage 1 MMU enabled. */\n" -".set .L_SCTLR_ELx_M, 0x1 << 0\n" -"/* Privileged Access Never is unchanged on taking an exception to EL1. */\n" -".set .L_SCTLR_EL1_SPAN, 0x1 << 23\n" -"/* SETEND instruction disabled at EL0 in aarch32 mode. */\n" -".set .L_SCTLR_EL1_SED, 0x1 << 8\n" -"/* Various IT instructions are disabled at EL0 in aarch32 mode. */\n" -".set .L_SCTLR_EL1_ITD, 0x1 << 7\n" -".set .L_SCTLR_EL1_RES1, (0x1 << 11) | (0x1 << 20) | (0x1 << 22) | (0x1 << " -"28) | (0x1 << 29)\n" -".set .Lsctlrval, .L_SCTLR_ELx_M | .L_SCTLR_ELx_C | .L_SCTLR_ELx_SA | ." -"L_SCTLR_EL1_ITD | .L_SCTLR_EL1_SED\n" -".set .Lsctlrval, .Lsctlrval | .L_SCTLR_ELx_I | .L_SCTLR_EL1_SPAN | ." -"L_SCTLR_EL1_RES1\n" -"\n" -"/**\n" -" * This is a generic entry point for an image. It carries out the operations " -"required to prepare the\n" -" * loaded image to be run. Specifically, it zeroes the bss section using " -"registers x25 and above,\n" -" * prepares the stack, enables floating point, and sets up the exception " -"vector. It preserves x0-x3\n" -" * for the Rust entry point, as these may contain boot parameters.\n" -" */\n" -".section .init.entry, \"ax\"\n" -".global entry\n" -"entry:\n" -"\t/* Load and apply the memory management configuration, ready to enable MMU " -"and caches. */\n" -"\tadrp x30, idmap\n" -"\tmsr ttbr0_el1, x30\n" -"\n" -"\tmov_i x30, .Lmairval\n" -"\tmsr mair_el1, x30\n" -"\n" -"\tmov_i x30, .Ltcrval\n" -"\t/* Copy the supported PA range into TCR_EL1.IPS. */\n" -"\tmrs x29, id_aa64mmfr0_el1\n" -"\tbfi x30, x29, #32, #4\n" -"\n" -"\tmsr tcr_el1, x30\n" -"\n" -"\tmov_i x30, .Lsctlrval\n" -"\n" -"\t/*\n" -"\t * Ensure everything before this point has completed, then invalidate any " -"potentially stale\n" -"\t * local TLB entries before they start being used.\n" -"\t */\n" -"\tisb\n" -"\ttlbi vmalle1\n" -"\tic iallu\n" -"\tdsb nsh\n" -"\tisb\n" -"\n" -"\t/*\n" -"\t * Configure sctlr_el1 to enable MMU and cache and don't proceed until " -"this has completed.\n" -"\t */\n" -"\tmsr sctlr_el1, x30\n" -"\tisb\n" -"\n" -"\t/* Disable trapping floating point access in EL1. */\n" -"\tmrs x30, cpacr_el1\n" -"\torr x30, x30, #(0x3 << 20)\n" -"\tmsr cpacr_el1, x30\n" -"\tisb\n" -"\n" -"\t/* Zero out the bss section. */\n" -"\tadr_l x29, bss_begin\n" -"\tadr_l x30, bss_end\n" -"0:\tcmp x29, x30\n" -"\tb.hs 1f\n" -"\tstp xzr, xzr, [x29], #16\n" -"\tb 0b\n" -"\n" -"1:\t/* Prepare the stack. */\n" -"\tadr_l x30, boot_stack_end\n" -"\tmov sp, x30\n" -"\n" -"\t/* Set up exception vector. */\n" -"\tadr x30, vector_table_el1\n" -"\tmsr vbar_el1, x30\n" -"\n" -"\t/* Call into Rust code. */\n" -"\tbl main\n" -"\n" -"\t/* Loop forever waiting for interrupts. */\n" -"2:\twfi\n" -"\tb 2b\n" -"```" -msgstr "" -"```armasm\n" -"/*\n" -" * Drepturi de autor 2023 Google LLC\n" -" *\n" -" * Licențiat sub licența Apache License, versiunea 2.0 (\"Licența\");\n" -" * nu aveți voie să utilizați acest fișier decât în conformitate cu " -"Licența.\n" -" * Puteți obține o copie a Licenței la adresa\n" -" *\n" -" * https://www.apache.org/licenses/LICENSE-2.0\n" -" *\n" -" * Cu excepția cazului în care legislația aplicabilă o impune sau se convine " -"în scris, software-ul\n" -" * distribuit în temeiul licenței este distribuit pe o BAZĂ \"AS IS\",\n" -" * FĂRĂ GARANȚII SAU CONDIȚII DE NICI UN FEL, fie ele exprese sau " -"implicite.\n" -" * Consultați Licența pentru limbajul specific care reglementează " -"permisiunile și\n" -" * limitări în cadrul Licenței.\n" -" */\n" -"\n" -".macro adr_l, reg:req, sym:req\n" -"\tadrp \\reg, \\sym\n" -"\tadd \\reg, \\reg, :lo12:\\sym\n" -".endm\n" -"\n" -".macro mov_i, reg:req, imm:req\n" -"\tmovz \\reg, :abs_g3:\\imm\n" -"\tmovk \\reg, :abs_g2_nc:\\imm\n" -"\tmovk \\reg, :abs_g1_nc:\\imm\n" -"\tmovk \\reg, :abs_g0_nc:\\imm\n" -".endm\n" -"\n" -".set .L_MAIR_DEV_nGnRE, 0x04\n" -".set .L_MAIR_MEM_WBWA, 0xff\n" -".set .Lmairval, .L_MAIR_DEV_nGnRE | (.L_MAIR_MEM_WBWA << 8)\n" -"\n" -"/* dimensiunea granulelor de 4 KiB pentru TTBR0_EL1. */\n" -".set .L_TCR_TG0_4KB, 0x0 << 14\n" -"/* dimensiunea granulelor de 4 KiB pentru TTBR1_EL1. */\n" -".set .L_TCR_TG1_4KB, 0x2 << 30\n" -"/* Dezactivează mersul pe tabela de traducere pentru TTBR1_EL1, generând în " -"schimb o eroare de traducere. */\n" -".set .L_TCR_EPD1, 0x1 << 23\n" -"/* Plimbările tabelelor de traducere pentru TTBR0_EL1 sunt partajabile la " -"nivel intern. */\n" -".set .L_TCR_SH_INNER, 0x3 << 12\n" -"/*\n" -" * Mersul tabelelor de conversie pentru TTBR0_EL1 este de tip write-back " -"extern read-allocate write-allocate\n" -" * cu memorie cache.\n" -" */\n" -".set .L_TCR_RGN_OWB, 0x1 << 10\n" -"/*\n" -" * Traducerea tabelelor de conversie pentru TTBR0_EL1 sunt de tip write-back " -"read-allocate write-allocate interior\n" -" * care pot fi stocate în memoria cache.\n" -" */\n" -".set .L_TCR_RGN_IWB, 0x1 << 8\n" -"/* Decalajul de dimensiune pentru TTBR0_EL1 este de 2**39 octeți (512 GiB). " -"*/\n" -".set .L_TCR_T0SZ_512, 64 - 39\n" -".set .Ltcrval, .L_TCR_TG0_4KB | .L_TCR_TG1_4KB | .L_TCR_EPD1 | ." -"L_TCR_RGN_OWB\n" -".set .Ltcrval, .Ltcrval | .L_TCR_RGN_IWB | .L_TCR_SH_INNER | ." -"L_TCR_T0SZ_512\n" -"\n" -"/* Nu este afectată capacitatea de stocare în memoria cache a accesului la " -"instrucțiunile din etapa 1. */\n" -".set .L_SCTLR_ELx_I, 0x1 << 12\n" -"/* Defecțiune de aliniere SP dacă SP nu este aliniat la o limită de 16 " -"octeți. */\n" -".set .L_SCTLR_ELx_SA, 0x1 << 3\n" -"/* Cacheabilitatea accesului la datele din etapa 1 nu este afectată. */\n" -".set .L_SCTLR_ELx_C, 0x1 << 2\n" -"/* Etapa 1 a MMU EL0 și EL1 a fost activată. */\n" -".set .L_SCTLR_ELx_M, 0x1 << 0\n" -"/* Privileged Access Never este neschimbat la luarea unei excepții la EL1. " -"*/\n" -".set .L_SCTLR_EL1_SPAN, 0x1 << 23\n" -"/* Instrucțiunea SETEND dezactivată la EL0 în modul aarch32. */\n" -".set .L_SCTLR_EL1_SED, 0x1 << 8\n" -"/* Diverse instrucțiuni IT sunt dezactivate la EL0 în modul aarch32. */\n" -".set .L_SCTLR_EL1_ITD, 0x1 << 7\n" -".set .L_SCTLR_EL1_RES1, (0x1 << 11) | (0x1 << 20) | (0x1 << 22) | (0x1 << " -"28) | (0x1 << 29)\n" -".set .Lsctlrval, .L_SCTLR_ELx_M | .L_SCTLR_ELx_C | .L_SCTLR_ELx_SA | ." -"L_SCTLR_EL1_ITD | .L_SCTLR_EL1_SED\n" -".set .Lsctlrval, .Lsctlrval | .L_SCTLR_ELx_I | .L_SCTLR_EL1_SPAN | ." -"L_SCTLR_EL1_RES1\n" -"\n" -"/**\n" -" * Acesta este un punct de intrare generic pentru o imagine. Acesta " -"efectuează operațiile necesare pentru a pregăti imaginea\n" -" * imaginea încărcată pentru a fi rulată. În mod specific, se resetează la " -"zero secțiunea bss folosind registrele x25 și mai sus,\n" -" * pregătește stiva, activează virgulă mobilă și stabilește vectorul de " -"excepții. Păstrează x0-x3\n" -" * pentru punctul de intrare Rust, deoarece acestea pot conține parametrii " -"de pornire.\n" -" */\n" -".section .init.entry, \"ax\"\n" -".global entry\n" -"entry:\n" -"\t/* Încarcă și aplică configurația de gestionare a memoriei, gata să " -"activeze MMU și cache-urile. */\n" -"\tadrp x30, idmap\n" -"\tmsr ttbr0_el1, x30\n" -"\n" -"\tmov_i x30, .Lmairval\n" -"\tmsr mair_el1, x30\n" -"\n" -"\tmov_i x30, .Ltcrval\n" -"\t/* Copiază intervalul PA acceptat în TCR_EL1.IPS. */\n" -"\tmrs x29, id_aa64mmfr0_el1\n" -"\tbfi x30, x29, #32, #4\n" -"\n" -"\tmsr tcr_el1, x30\n" -"\n" -"\tmov_i x30, .Lsctlrval\n" -"\n" -"\t/*\n" -"\t * Asigură-te că tot ceea ce s-a întâmplat înainte de acest punct s-a " -"finalizat, apoi invalidează orice date potențial vechi\n" -"\t * locale TLB înainte ca acestea să înceapă să fie utilizate.\n" -"\t */\n" -"\tisb\n" -"\ttlbi vmalle1\n" -"\tic iallu\n" -"\tdsb nsh\n" -"\tisb\n" -"\n" -"\t/*\n" -"\t * Configurați sctlr_el1 pentru a activa MMU și memoria cache și nu " -"continuați până când acest lucru nu este finalizat.\n" -"\t */\n" -"\tmsr sctlr_el1, x30\n" -"\tisb\n" -"\n" -"\t/* Dezactivează captarea accesului în virgulă mobilă în EL1. */\n" -"\tmrs x30, cpacr_el1\n" -"\torr x30, x30, #(0x3 << 20)\n" -"\tmsr cpacr_el1, x30\n" -"\tisb\n" -"\n" -"\t/* Elimină secțiunea bss. */\n" -"\tadr_l x29, bss_begin\n" -"\tadr_l x30, bss_end\n" -"0: cmp x29, x30\n" -"\tb.hs 1f\n" -"\tstp xzr, xzr, [x29], #16\n" -"\tb 0b\n" -"\n" -"1: /* Pregătește stiva. */\n" -"\tadr_l x30, boot_stack_end\n" -"\tmov sp, x30\n" -"\n" -"\t/* Setează vectorul de excepție. */\n" -"\tadr x30, vector_table_el1\n" -"\tmsr vbar_el1, x30\n" -"\n" -"\t/* Apel în codul Rust. */\n" -"\tbl main\n" -"\n" -"\t/* Bucla veșnică în așteptarea întreruperilor. */\n" -"2: wfi\n" -"\tb 2b\n" -"```" - -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:604 #, fuzzy msgid "_exceptions.S_ (you shouldn't need to change this):" msgstr "_exceptions.S_ (nu ar trebui să fie nevoie să modificați acest lucru):" -#: src/exercises/bare-metal/rtc.md -#, fuzzy -msgid "" -"```armasm\n" -"/*\n" -" * Copyright 2023 Google LLC\n" -" *\n" -" * Licensed under the Apache License, Version 2.0 (the \"License\");\n" -" * you may not use this file except in compliance with the License.\n" -" * You may obtain a copy of the License at\n" -" *\n" -" * https://www.apache.org/licenses/LICENSE-2.0\n" -" *\n" -" * Unless required by applicable law or agreed to in writing, software\n" -" * distributed under the License is distributed on an \"AS IS\" BASIS,\n" -" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" -" * See the License for the specific language governing permissions and\n" -" * limitations under the License.\n" -" */\n" -"\n" -"/**\n" -" * Saves the volatile registers onto the stack. This currently takes 14\n" -" * instructions, so it can be used in exception handlers with 18 " -"instructions\n" -" * left.\n" -" *\n" -" * On return, x0 and x1 are initialised to elr_el2 and spsr_el2 " -"respectively,\n" -" * which can be used as the first and second arguments of a subsequent " -"call.\n" -" */\n" -".macro save_volatile_to_stack\n" -"\t/* Reserve stack space and save registers x0-x18, x29 & x30. */\n" -"\tstp x0, x1, [sp, #-(8 * 24)]!\n" -"\tstp x2, x3, [sp, #8 * 2]\n" -"\tstp x4, x5, [sp, #8 * 4]\n" -"\tstp x6, x7, [sp, #8 * 6]\n" -"\tstp x8, x9, [sp, #8 * 8]\n" -"\tstp x10, x11, [sp, #8 * 10]\n" -"\tstp x12, x13, [sp, #8 * 12]\n" -"\tstp x14, x15, [sp, #8 * 14]\n" -"\tstp x16, x17, [sp, #8 * 16]\n" -"\tstr x18, [sp, #8 * 18]\n" -"\tstp x29, x30, [sp, #8 * 20]\n" -"\n" -"\t/*\n" -"\t * Save elr_el1 & spsr_el1. This such that we can take nested exception\n" -"\t * and still be able to unwind.\n" -"\t */\n" -"\tmrs x0, elr_el1\n" -"\tmrs x1, spsr_el1\n" -"\tstp x0, x1, [sp, #8 * 22]\n" -".endm\n" -"\n" -"/**\n" -" * Restores the volatile registers from the stack. This currently takes 14\n" -" * instructions, so it can be used in exception handlers while still leaving " -"18\n" -" * instructions left; if paired with save_volatile_to_stack, there are 4\n" -" * instructions to spare.\n" -" */\n" -".macro restore_volatile_from_stack\n" -"\t/* Restore registers x2-x18, x29 & x30. */\n" -"\tldp x2, x3, [sp, #8 * 2]\n" -"\tldp x4, x5, [sp, #8 * 4]\n" -"\tldp x6, x7, [sp, #8 * 6]\n" -"\tldp x8, x9, [sp, #8 * 8]\n" -"\tldp x10, x11, [sp, #8 * 10]\n" -"\tldp x12, x13, [sp, #8 * 12]\n" -"\tldp x14, x15, [sp, #8 * 14]\n" -"\tldp x16, x17, [sp, #8 * 16]\n" -"\tldr x18, [sp, #8 * 18]\n" -"\tldp x29, x30, [sp, #8 * 20]\n" -"\n" -"\t/* Restore registers elr_el1 & spsr_el1, using x0 & x1 as scratch. */\n" -"\tldp x0, x1, [sp, #8 * 22]\n" -"\tmsr elr_el1, x0\n" -"\tmsr spsr_el1, x1\n" -"\n" -"\t/* Restore x0 & x1, and release stack space. */\n" -"\tldp x0, x1, [sp], #8 * 24\n" -".endm\n" -"\n" -"/**\n" -" * This is a generic handler for exceptions taken at the current EL while " -"using\n" -" * SP0. It behaves similarly to the SPx case by first switching to SPx, " -"doing\n" -" * the work, then switching back to SP0 before returning.\n" -" *\n" -" * Switching to SPx and calling the Rust handler takes 16 instructions. To\n" -" * restore and return we need an additional 16 instructions, so we can " -"implement\n" -" * the whole handler within the allotted 32 instructions.\n" -" */\n" -".macro current_exception_sp0 handler:req\n" -"\tmsr spsel, #1\n" -"\tsave_volatile_to_stack\n" -"\tbl \\handler\n" -"\trestore_volatile_from_stack\n" -"\tmsr spsel, #0\n" -"\teret\n" -".endm\n" -"\n" -"/**\n" -" * This is a generic handler for exceptions taken at the current EL while " -"using\n" -" * SPx. It saves volatile registers, calls the Rust handler, restores " -"volatile\n" -" * registers, then returns.\n" -" *\n" -" * This also works for exceptions taken from EL0, if we don't care about\n" -" * non-volatile registers.\n" -" *\n" -" * Saving state and jumping to the Rust handler takes 15 instructions, and\n" -" * restoring and returning also takes 15 instructions, so we can fit the " -"whole\n" -" * handler in 30 instructions, under the limit of 32.\n" -" */\n" -".macro current_exception_spx handler:req\n" -"\tsave_volatile_to_stack\n" -"\tbl \\handler\n" -"\trestore_volatile_from_stack\n" -"\teret\n" -".endm\n" -"\n" -".section .text.vector_table_el1, \"ax\"\n" -".global vector_table_el1\n" -".balign 0x800\n" -"vector_table_el1:\n" -"sync_cur_sp0:\n" -"\tcurrent_exception_sp0 sync_exception_current\n" -"\n" -".balign 0x80\n" -"irq_cur_sp0:\n" -"\tcurrent_exception_sp0 irq_current\n" -"\n" -".balign 0x80\n" -"fiq_cur_sp0:\n" -"\tcurrent_exception_sp0 fiq_current\n" -"\n" -".balign 0x80\n" -"serr_cur_sp0:\n" -"\tcurrent_exception_sp0 serr_current\n" -"\n" -".balign 0x80\n" -"sync_cur_spx:\n" -"\tcurrent_exception_spx sync_exception_current\n" -"\n" -".balign 0x80\n" -"irq_cur_spx:\n" -"\tcurrent_exception_spx irq_current\n" -"\n" -".balign 0x80\n" -"fiq_cur_spx:\n" -"\tcurrent_exception_spx fiq_current\n" -"\n" -".balign 0x80\n" -"serr_cur_spx:\n" -"\tcurrent_exception_spx serr_current\n" -"\n" -".balign 0x80\n" -"sync_lower_64:\n" -"\tcurrent_exception_spx sync_lower\n" -"\n" -".balign 0x80\n" -"irq_lower_64:\n" -"\tcurrent_exception_spx irq_lower\n" -"\n" -".balign 0x80\n" -"fiq_lower_64:\n" -"\tcurrent_exception_spx fiq_lower\n" -"\n" -".balign 0x80\n" -"serr_lower_64:\n" -"\tcurrent_exception_spx serr_lower\n" -"\n" -".balign 0x80\n" -"sync_lower_32:\n" -"\tcurrent_exception_spx sync_lower\n" -"\n" -".balign 0x80\n" -"irq_lower_32:\n" -"\tcurrent_exception_spx irq_lower\n" -"\n" -".balign 0x80\n" -"fiq_lower_32:\n" -"\tcurrent_exception_spx fiq_lower\n" -"\n" -".balign 0x80\n" -"serr_lower_32:\n" -"\tcurrent_exception_spx serr_lower\n" -"```" -msgstr "" -"```armasm\n" -"/*\n" -" * Drepturi de autor 2023 Google LLC\n" -" *\n" -" * Licențiat sub licența Apache License, versiunea 2.0 (\"Licența\");\n" -" * nu aveți voie să utilizați acest fișier decât în conformitate cu " -"Licența.\n" -" * Puteți obține o copie a Licenței la adresa\n" -" *\n" -" * https://www.apache.org/licenses/LICENSE-2.0\n" -" *\n" -" * Cu excepția cazului în care legislația aplicabilă o impune sau se convine " -"în scris, software-ul\n" -" * distribuit în temeiul licenței este distribuit pe o BAZĂ \"AS IS\",\n" -" * FĂRĂ GARANȚII SAU CONDIȚII DE NICI UN FEL, fie ele exprese sau " -"implicite.\n" -" * Consultați Licența pentru limbajul specific care reglementează " -"permisiunile și\n" -" * limitări în cadrul Licenței.\n" -" */\n" -"\n" -"/**\n" -" * Salvează registrele volatile pe stivă. Acest lucru durează în prezent 14\n" -" * instrucțiuni, astfel încât poate fi utilizat în gestionarii de excepții " -"cu 18 instrucțiuni\n" -" * stânga.\n" -" *\n" -" * La întoarcere, x0 și x1 sunt inițializate la elr_el2 și, respectiv, " -"spsr_el2,\n" -" * care pot fi utilizate ca primul și al doilea argument al unui apel " -"ulterior.\n" -" */\n" -".macro save_volatile_to_stack\n" -"\t/* Rezervă spațiul stivei și salvează registrele x0-x18, x29 & x30. */\n" -"\tstp x0, x1, [sp, #-(8 * 24)]!\n" -"\tstp x2, x3, [sp, #8 * 2]\n" -"\tstp x4, x5, [sp, #8 * 4]\n" -"\tstp x6, x7, [sp, #8 * 6]\n" -"\tstp x8, x9, [sp, #8 * 8]\n" -"\tstp x10, x11, [sp, #8 * 10]\n" -"\tstp x12, x13, [sp, #8 * 12]\n" -"\tstp x14, x15, [sp, #8 * 14]\n" -"\tstp x16, x17, [sp, #8 * 16]\n" -"\tstr x18, [sp, #8 * 18]\n" -"\tstp x29, x30, [sp, #8 * 20]\n" -"\n" -"\t/*\n" -"\t * Salvați elr_el1 & spsr_el1. Acest lucru astfel încât să putem lua " -"excepții imbricate\n" -"\t * și totuși să putem derula.\n" -"\t */\n" -"\tmrs x0, elr_el1\n" -"\tmrs x1, spsr_el1\n" -"\tstp x0, x1, [sp, #8 * 22]\n" -".endm\n" -"\n" -"/**\n" -" * Restabilește registrele volatile din stivă. În prezent, acest lucru " -"durează 14\n" -" * instrucțiuni, astfel încât poate fi utilizată în gestionarii de excepții, " -"lăsând în continuare 18\n" -" * instrucțiuni rămase; dacă este asociat cu save_volatile_to_stack, mai " -"rămân 4 instrucțiuni\n" -" * instrucțiuni de rezervă.\n" -" */\n" -".macro restore_volatile_from_stack\n" -"\t/* Restaurează registrele x2-x18, x29 și x30. */\n" -"\tldp x2, x3, [sp, #8 * 2]\n" -"\tldp x4, x5, [sp, #8 * 4]\n" -"\tldp x6, x7, [sp, #8 * 6]\n" -"\tldp x8, x9, [sp, #8 * 8]\n" -"\tldp x10, x11, [sp, #8 * 10]\n" -"\tldp x12, x13, [sp, #8 * 12]\n" -"\tldp x14, x15, [sp, #8 * 14]\n" -"\tldp x16, x17, [sp, #8 * 16]\n" -"\tldr x18, [sp, #8 * 18]\n" -"\tldp x29, x30, [sp, #8 * 20]\n" -"\n" -"\t/* Restaurați registrele elr_el1 & spsr_el1, folosind x0 & x1 ca zero. */\n" -"\tldp x0, x1, [sp, #8 * 22]\n" -"\tmsr elr_el1, x0\n" -"\tmsr spsr_el1, x1\n" -"\n" -"\t/* Restaurați x0 & x1 și eliberați spațiul din stivă. */\n" -"\tldp x0, x1, [sp], #8 * 24\n" -".endm\n" -"\n" -"/**\n" -" * Acesta este un gestionar generic pentru excepțiile luate la EL curent în " -"timp ce se utilizează\n" -" * SP0. Se comportă în mod similar cu cazul SPx, trecând mai întâi la SPx, " -"făcând\n" -" * treaba, apoi revine la SP0 înainte de a se întoarce.\n" -" *\n" -" * Comutarea în SPx și apelarea gestionarului Rust necesită 16 instrucțiuni. " -"La\n" -" * restabilirea și întoarcerea avem nevoie de încă 16 instrucțiuni, astfel " -"încât să putem implementa\n" -" * întregul manipulator în cele 32 de instrucțiuni alocate.\n" -" */\n" -".macro current_exception_sp0 handler:req\n" -"\tmsr spsel, #1\n" -"\tsave_volatile_to_stack\n" -"\tbl \\handler\n" -"\trestore_volatile_from_stack\n" -"\tmsr spsel, #0\n" -"\teret\n" -".endm\n" -"\n" -"/**\n" -" * Acesta este un gestionar generic pentru excepțiile luate la EL curent în " -"timp ce se utilizează\n" -" * SPx. Acesta salvează registrele volatile, apelează gestionarul Rust, " -"restabilește registrele volatile\n" -" * și apoi se întoarce.\n" -" *\n" -" * Acest lucru funcționează și pentru excepțiile luate din EL0, dacă nu ne " -"pasă de\n" -" * registrele nevolatile.\n" -" *\n" -" * Salvarea stării și saltul la gestionarul Rust durează 15 instrucțiuni, " -"iar\n" -" * restabilirea și întoarcerea durează, de asemenea, 15 instrucțiuni, astfel " -"încât putem încadra întreaga\n" -" * în 30 de instrucțiuni, sub limita de 32.\n" -" */\n" -".macro current_exception_spx handler:req\n" -"\tsave_volatile_to_stack\n" -"\tbl \\handler\n" -"\trestore_volatile_from_stack\n" -"\teret\n" -".endm\n" -"\n" -".section .text.vector_table_el1, \"ax\"\n" -".global vector_table_el1\n" -".balign 0x800\n" -"vector_table_el1:\n" -"sync_cur_sp0:\n" -"\tcurrent_exception_sp0 sync_exception_current\n" -"\n" -".balign 0x80\n" -"irq_cur_sp0:\n" -"\tcurrent_exception_sp0 irq_current\n" -"\n" -".balign 0x80\n" -"fiq_cur_sp0:\n" -"\tcurrent_exception_sp0 fiq_current\n" -"\n" -".balign 0x80\n" -"serr_cur_sp0:\n" -"\tcurrent_exception_sp0 serr_current\n" -"\n" -".balign 0x80\n" -"sync_cur_spx:\n" -"\tcurrent_exception_spx sync_exception_current\n" -"\n" -".balign 0x80\n" -"irq_cur_spx:\n" -"\tcurrent_exception_spx irq_current\n" -"\n" -".balign 0x80\n" -"fiq_cur_spx:\n" -"\tcurrent_exception_spx fiq_current\n" -"\n" -".balign 0x80\n" -"serr_cur_spx:\n" -"\tcurrent_exception_spx serr_current\n" -"\n" -".balign 0x80\n" -"sync_lower_64:\n" -"\tcurrent_exception_spx sync_lower\n" -"\n" -".balign 0x80\n" -"irq_lower_64:\n" -"\tcurrent_exception_spx irq_lower\n" -"\n" -".balign 0x80\n" -"fiq_lower_64:\n" -"\tcurrent_exception_spx fiq_lower\n" -"\n" -".balign 0x80\n" -"serr_lower_64:\n" -"\tcurrent_exception_spx serr_lower\n" -"\n" -".balign 0x80\n" -"sync_lower_32:\n" -"\tcurrent_exception_spx sync_lower\n" -"\n" -".balign 0x80\n" -"irq_lower_32:\n" -"\tcurrent_exception_spx irq_lower\n" -"\n" -".balign 0x80\n" -"fiq_lower_32:\n" -"\tcurrent_exception_spx fiq_lower\n" -"\n" -".balign 0x80\n" -"serr_lower_32:\n" -"\tcurrent_exception_spx serr_lower\n" -"```" - -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:790 #, fuzzy msgid "_idmap.S_ (you shouldn't need to change this):" msgstr "_idmap.S_ (nu ar trebui să fie nevoie să modificați acest lucru):" -#: src/exercises/bare-metal/rtc.md -#, fuzzy -msgid "" -"```armasm\n" -"/*\n" -" * Copyright 2023 Google LLC\n" -" *\n" -" * Licensed under the Apache License, Version 2.0 (the \"License\");\n" -" * you may not use this file except in compliance with the License.\n" -" * You may obtain a copy of the License at\n" -" *\n" -" * https://www.apache.org/licenses/LICENSE-2.0\n" -" *\n" -" * Unless required by applicable law or agreed to in writing, software\n" -" * distributed under the License is distributed on an \"AS IS\" BASIS,\n" -" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" -" * See the License for the specific language governing permissions and\n" -" * limitations under the License.\n" -" */\n" -"\n" -".set .L_TT_TYPE_BLOCK, 0x1\n" -".set .L_TT_TYPE_PAGE, 0x3\n" -".set .L_TT_TYPE_TABLE, 0x3\n" -"\n" -"/* Access flag. */\n" -".set .L_TT_AF, 0x1 << 10\n" -"/* Not global. */\n" -".set .L_TT_NG, 0x1 << 11\n" -".set .L_TT_XN, 0x3 << 53\n" -"\n" -".set .L_TT_MT_DEV, 0x0 << 2\t\t\t// MAIR #0 (DEV_nGnRE)\n" -".set .L_TT_MT_MEM, (0x1 << 2) | (0x3 << 8)\t// MAIR #1 (MEM_WBWA), inner " -"shareable\n" -"\n" -".set .L_BLOCK_DEV, .L_TT_TYPE_BLOCK | .L_TT_MT_DEV | .L_TT_AF | .L_TT_XN\n" -".set .L_BLOCK_MEM, .L_TT_TYPE_BLOCK | .L_TT_MT_MEM | .L_TT_AF | .L_TT_NG\n" -"\n" -".section \".rodata.idmap\", \"a\", %progbits\n" -".global idmap\n" -".align 12\n" -"idmap:\n" -"\t/* level 1 */\n" -"\t.quad\t\t.L_BLOCK_DEV | 0x0\t\t // 1 GiB of device mappings\n" -"\t.quad\t\t.L_BLOCK_MEM | 0x40000000\t// 1 GiB of DRAM\n" -"\t.fill\t\t254, 8, 0x0\t\t\t// 254 GiB of unmapped VA space\n" -"\t.quad\t\t.L_BLOCK_DEV | 0x4000000000 // 1 GiB of device mappings\n" -"\t.fill\t\t255, 8, 0x0\t\t\t// 255 GiB of remaining VA space\n" -"```" -msgstr "" -"```armasm\n" -"/*\n" -" * Drepturi de autor 2023 Google LLC\n" -" *\n" -" * Licențiat sub licența Apache License, versiunea 2.0 (\"Licența\");\n" -" * nu aveți voie să utilizați acest fișier decât în conformitate cu " -"Licența.\n" -" * Puteți obține o copie a Licenței la adresa\n" -" *\n" -" * https://www.apache.org/licenses/LICENSE-2.0\n" -" *\n" -" * Cu excepția cazului în care legislația aplicabilă o impune sau se convine " -"în scris, software-ul\n" -" * distribuit în temeiul licenței este distribuit pe o BAZĂ \"AS IS\",\n" -" * FĂRĂ GARANȚII SAU CONDIȚII DE NICI UN FEL, fie ele exprese sau " -"implicite.\n" -" * Consultați Licența pentru limbajul specific care reglementează " -"permisiunile și\n" -" * limitări în cadrul Licenței.\n" -" */\n" -"\n" -".set .L_TT_TYPE_BLOCK, 0x1\n" -".set .L_TT_TYPE_PAGE, 0x3\n" -".set .L_TT_TYPE_TABLE, 0x3\n" -"\n" -"/* Indicator de acces. */\n" -".set .L_TT_AF, 0x1 << 10\n" -"/* Nu este global. */\n" -".set .L_TT_NG, 0x1 << 11\n" -".set .L_TT_XN, 0x3 << 53\n" -"\n" -".set .L_TT_MT_DEV, 0x0 << 2 // MAIR #0 (DEV_nGnRE)\n" -".set .L_TT_MT_MEM, (0x1 << 2) | (0x3 << 8) // MAIR #1 (MEM_WBWA), partajabil " -"în interior\n" -"\n" -".set .L_BLOCK_DEV, .L_TT_TYPE_BLOCK | .L_TT_MT_DEV | .L_TT_AF | .L_TT_XN\n" -".set .L_BLOCK_MEM, .L_TT_TYPE_BLOCK | .L_TT_MT_MEM | .L_TT_AF | .L_TT_NG\n" -"\n" -".section \".rodata.idmap\", \"a\", %progbits\n" -".global idmap\n" -".align 12\n" -"idmap:\n" -"\t/* nivel 1 */\n" -"\t.quad .L_BLOCK_DEV | 0x0 // 1 GiB de mapare a dispozitivelor\n" -"\t.quad .L_BLOCK_MEM | 0x40000000 // 1 GiB de DRAM\n" -"\t.fill 254, 8, 0x0 // 254 GiB de spațiu VA nemarcat\n" -"\t.quad .L_BLOCK_DEV | 0x4000000000 // 1 GiB de mapare a dispozitivelor\n" -"\t.fill 255, 8, 0x0 // 255 GiB de spațiu VA rămas\n" -"```" - -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:840 #, fuzzy msgid "_image.ld_ (you shouldn't need to change this):" msgstr "_image.ld_ (nu ar trebui să fie nevoie să modificați acest lucru):" -#: src/exercises/bare-metal/rtc.md -#, fuzzy -msgid "" -"```ld\n" -"/*\n" -" * Copyright 2023 Google LLC\n" -" *\n" -" * Licensed under the Apache License, Version 2.0 (the \"License\");\n" -" * you may not use this file except in compliance with the License.\n" -" * You may obtain a copy of the License at\n" -" *\n" -" * https://www.apache.org/licenses/LICENSE-2.0\n" -" *\n" -" * Unless required by applicable law or agreed to in writing, software\n" -" * distributed under the License is distributed on an \"AS IS\" BASIS,\n" -" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" -" * See the License for the specific language governing permissions and\n" -" * limitations under the License.\n" -" */\n" -"\n" -"/*\n" -" * Code will start running at this symbol which is placed at the start of " -"the\n" -" * image.\n" -" */\n" -"ENTRY(entry)\n" -"\n" -"MEMORY\n" -"{\n" -"\timage : ORIGIN = 0x40080000, LENGTH = 2M\n" -"}\n" -"\n" -"SECTIONS\n" -"{\n" -"\t/*\n" -"\t * Collect together the code.\n" -"\t */\n" -"\t.init : ALIGN(4096) {\n" -"\t\ttext_begin = .;\n" -"\t\t*(.init.entry)\n" -"\t\t*(.init.*)\n" -"\t} >image\n" -"\t.text : {\n" -"\t\t*(.text.*)\n" -"\t} >image\n" -"\ttext_end = .;\n" -"\n" -"\t/*\n" -"\t * Collect together read-only data.\n" -"\t */\n" -"\t.rodata : ALIGN(4096) {\n" -"\t\trodata_begin = .;\n" -"\t\t*(.rodata.*)\n" -"\t} >image\n" -"\t.got : {\n" -"\t\t*(.got)\n" -"\t} >image\n" -"\trodata_end = .;\n" -"\n" -"\t/*\n" -"\t * Collect together the read-write data including .bss at the end which\n" -"\t * will be zero'd by the entry code.\n" -"\t */\n" -"\t.data : ALIGN(4096) {\n" -"\t\tdata_begin = .;\n" -"\t\t*(.data.*)\n" -"\t\t/*\n" -"\t\t * The entry point code assumes that .data is a multiple of 32\n" -"\t\t * bytes long.\n" -"\t\t */\n" -"\t\t. = ALIGN(32);\n" -"\t\tdata_end = .;\n" -"\t} >image\n" -"\n" -"\t/* Everything beyond this point will not be included in the binary. */\n" -"\tbin_end = .;\n" -"\n" -"\t/* The entry point code assumes that .bss is 16-byte aligned. */\n" -"\t.bss : ALIGN(16) {\n" -"\t\tbss_begin = .;\n" -"\t\t*(.bss.*)\n" -"\t\t*(COMMON)\n" -"\t\t. = ALIGN(16);\n" -"\t\tbss_end = .;\n" -"\t} >image\n" -"\n" -"\t.stack (NOLOAD) : ALIGN(4096) {\n" -"\t\tboot_stack_begin = .;\n" -"\t\t. += 40 * 4096;\n" -"\t\t. = ALIGN(4096);\n" -"\t\tboot_stack_end = .;\n" -"\t} >image\n" -"\n" -"\t. = ALIGN(4K);\n" -"\tPROVIDE(dma_region = .);\n" -"\n" -"\t/*\n" -"\t * Remove unused sections from the image.\n" -"\t */\n" -"\t/DISCARD/ : {\n" -"\t\t/* The image loads itself so doesn't need these sections. */\n" -"\t\t*(.gnu.hash)\n" -"\t\t*(.hash)\n" -"\t\t*(.interp)\n" -"\t\t*(.eh_frame_hdr)\n" -"\t\t*(.eh_frame)\n" -"\t\t*(.note.gnu.build-id)\n" -"\t}\n" -"}\n" -"```" -msgstr "" -"```ld\n" -"/*\n" -" * Drepturi de autor 2023 Google LLC\n" -" *\n" -" * Licențiat sub Licența Apache, versiunea 2.0 (denumită în continuare " -"\"Licența\");\n" -" * nu aveți voie să utilizați acest fișier decât în conformitate cu " -"Licența.\n" -" * Puteți obține o copie a Licenței la adresa\n" -" *\n" -" * https://www.apache.org/licenses/LICENSE-2.0\n" -" *\n" -" * Cu excepția cazului în care legislația aplicabilă o impune sau se convine " -"în scris, software-ul\n" -" * distribuit în temeiul licenței este distribuit pe o BAZĂ \"AS IS\",\n" -" * FĂRĂ GARANȚII SAU CONDIȚII DE NICI UN FEL, fie ele exprese sau " -"implicite.\n" -" * Consultați Licența pentru limbajul specific care reglementează " -"permisiunile și\n" -" * limitări în cadrul Licenței.\n" -" */\n" -"\n" -"/*\n" -" * Codul va începe să ruleze la acest simbol care este plasat la începutul\n" -" * imagine.\n" -" */\n" -"ENTRY(intrare)\n" -"\n" -"MEMORIE\n" -"{\n" -"\timage : ORIGIN = 0x40080000, LENGTH = 2M\n" -"}\n" -"\n" -"SECȚIUNI\n" -"{\n" -"\t/*\n" -"\t * Adunați împreună codul.\n" -"\t */\n" -"\t.init : ALIGN(4096) {\n" -"\t\ttext_begin = ..;\n" -"\t\t*(.init.entry)\n" -"\t\t*(.init.*)\n" -"\t} >imagine\n" -"\t.text : {\n" -"\t\t*(.text.*)\n" -"\t} >imagine\n" -"\ttext_end = ..;\n" -"\n" -"\t/*\n" -"\t * Adună împreună datele numai pentru citire.\n" -"\t */\n" -"\t.rodata : ALIGN(4096) {\n" -"\t\trodata_begin = ..;\n" -"\t\t*(.rodata.*)\n" -"\t} >imagine\n" -"\t.got : {\n" -"\t\t*(.got)\n" -"\t} >imagine\n" -"\trodata_end = .;\n" -"\n" -"\t/*\n" -"\t * Colectează împreună datele de citire-scriere, inclusiv .bss de la " -"sfârșit, care\n" -"\t * va fi anulat de codul de intrare.\n" -"\t */\n" -"\t.data : ALIGN(4096) {\n" -"\t\tdata_begin = ..;\n" -"\t\t*(.data.*)\n" -"\t\t/*\n" -"\t\t * Codul punctului de intrare presupune că .data este un multiplu de 32\n" -"\t\t * octeți.\n" -"\t\t */\n" -"\t\t. = ALIGN(32);\n" -"\t\tdata_end = .;\n" -"\t} >imagine\n" -"\n" -"\t/* Tot ceea ce depășește acest punct nu va fi inclus în binar. */\n" -"\tbin_end = ..;\n" -"\n" -"\t/* Codul punctului de intrare presupune că .bss este aliniat pe 16 octeți. " -"*/\n" -"\t.bss : ALIGN(16) {\n" -"\t\tbss_begin = ..;\n" -"\t\t*(.bss.*)\n" -"\t\t*(COMUN)\n" -"\t\t. = ALIGN(16);\n" -"\t\tbss_end = .;\n" -"\t} >imagine\n" -"\n" -"\t.stack (NOLOAD) : ALIGN(4096) {\n" -"\t\tboot_stack_begin = ..;\n" -"\t\t. += 40 * 4096;\n" -"\t\t. = ALIGN(4096);\n" -"\t\tboot_stack_end = .;\n" -"\t} >imagine\n" -"\n" -"\t. = ALIGN(4K);\n" -"\tPROVIDE(dma_region = .);\n" -"\n" -"\t/*\n" -"\t * Elimină secțiunile neutilizate din imagine.\n" -"\t */\n" -"\t/DISCARD/ : {\n" -"\t\t/* Imaginea se încarcă singură, deci nu are nevoie de aceste secțiuni. " -"*/\n" -"\t\t*(.gnu.hash)\n" -"\t\t*(.hash)\n" -"\t\t*(.interp)\n" -"\t\t*(.eh_frame_hdr)\n" -"\t\t*(.eh_frame)\n" -"\t\t*(.note.gnu.build-id)\n" -"\t}\n" -"}\n" -"```" - -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:952 #, fuzzy msgid "_Makefile_ (you shouldn't need to change this):" msgstr "_Makefile_ (nu ar trebui să fie nevoie să modificați acest lucru):" -#: src/exercises/bare-metal/rtc.md -msgid "# Copyright 2023 Google LLC" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "$(shell uname -s)" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -#, fuzzy -msgid "aarch64-linux-gnu" -msgstr "aarch64-paging" - -#: src/exercises/bare-metal/rtc.md -msgid "stdio -display none -kernel $< -s" -msgstr "" - -#: src/exercises/bare-metal/rtc.md -msgid "cargo clean" -msgstr "" - -#: src/exercises/bare-metal/rtc.md +#: src/exercises/bare-metal/rtc.md:1009 #, fuzzy msgid "Run the code in QEMU with `make qemu`." msgstr "Rulați codul în QEMU cu `make qemu`." -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:1 msgid "Bare Metal Rust Afternoon" msgstr "Rust bare metal După-amiază" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:5 #, fuzzy msgid "([back to exercise](rtc.md))" msgstr "([back to exercise](rtc.md))" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:7 #, fuzzy msgid "_main.rs_:" msgstr "_main.rs_:" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:29 +#, fuzzy +msgid "/// Base addresses of the GICv3.\n" +msgstr "/// Adresele de bază ale GICv3.\n" + +#: src/exercises/bare-metal/solutions-afternoon.md:36 +#, fuzzy msgid "/// Base address of the PL031 RTC.\n" -msgstr "" +msgstr "/// Adresa de bază a PL031 RTC.\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:38 +#, fuzzy msgid "/// The IRQ used by the PL031 RTC.\n" +msgstr "/// IRQ-ul utilizat de PL031 RTC.\n" + +#: src/exercises/bare-metal/solutions-afternoon.md:49 +#, fuzzy +msgid "\"main({:#x}, {:#x}, {:#x}, {:#x})\"" +msgstr "\"main({:#x}, {:#x}, {:#x}, {:#x})\"" + +#: src/exercises/bare-metal/solutions-afternoon.md:51 +#, fuzzy +msgid "" +"// Safe because `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 "" +"// Sigur, deoarece `GICD_BASE_ADDRESS` și `GICR_BASE_ADDRESS` sunt baza\n" +" // adrese ale unui distribuitor și, respectiv, redistribuitor GICv3, și\n" +" // nimic altceva nu accesează aceste intervale de adrese.\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:57 +#, fuzzy msgid "" "// Safe because `PL031_BASE_ADDRESS` is the base address of a PL031 device,\n" " // and nothing else accesses that address range.\n" msgstr "" +"// Sigur, deoarece `PL031_BASE_ADDRESS` este adresa de bază a unui " +"dispozitiv PL031,\n" +" // și nimic altceva nu accesează acest interval de adrese.\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:62 +#, fuzzy msgid "\"RTC: {time}\"" -msgstr "" +msgstr "\"RTC: {time}\"" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:70 +#, fuzzy msgid "// Wait for 3 seconds, without interrupts.\n" -msgstr "" +msgstr "// Așteptați timp de 3 secunde, fără întreruperi.\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:73 +#: src/exercises/bare-metal/solutions-afternoon.md:91 +#, fuzzy msgid "\"Waiting for {}\"" -msgstr "" +msgstr "\"În așteptare pentru {}\"" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:75 +#: src/exercises/bare-metal/solutions-afternoon.md:83 +#: src/exercises/bare-metal/solutions-afternoon.md:96 +#: src/exercises/bare-metal/solutions-afternoon.md:104 +#, fuzzy msgid "\"matched={}, interrupt_pending={}\"" -msgstr "" +msgstr "\"matched={}, interrupt_pending={}\"" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:87 +#: src/exercises/bare-metal/solutions-afternoon.md:108 +#, fuzzy msgid "\"Finished waiting\"" -msgstr "" +msgstr "\"Am terminat de așteptat\"" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:89 +#, fuzzy msgid "// Wait another 3 seconds for an interrupt.\n" -msgstr "" +msgstr "// Așteptați încă 3 secunde pentru o întrerupere.\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:121 #, fuzzy msgid "_pl031.rs_:" msgstr "_pl031.rs_:" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:128 +#, fuzzy msgid "/// Data register\n" -msgstr "" +msgstr "/// Registrul de date\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:130 +#, fuzzy msgid "/// Match register\n" -msgstr "" +msgstr "/// Registrul de corespondență\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:132 +#, fuzzy msgid "/// Load register\n" -msgstr "" +msgstr "/// Încărcați registrul\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:134 +#, fuzzy msgid "/// Control register\n" -msgstr "" +msgstr "/// Registrul de control\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:137 +#, fuzzy msgid "/// Interrupt Mask Set or Clear register\n" -msgstr "" +msgstr "/// Registru de setare sau ștergere a măștii de întrerupere\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:140 +#, fuzzy msgid "/// Raw Interrupt Status\n" -msgstr "" +msgstr "/// Starea de întrerupere brută\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:143 +#, fuzzy msgid "/// Masked Interrupt Status\n" -msgstr "" +msgstr "/// Stare de întrerupere mascată\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:146 +#, fuzzy msgid "/// Interrupt Clear Register\n" -msgstr "" +msgstr "/// Registrul de ștergere a întreruperilor\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:150 #, fuzzy msgid "/// Driver for a PL031 real-time clock.\n" msgstr "Vom scrie un driver pentru dispozitivul de ceas în timp real PL031." -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:158 +#, fuzzy msgid "" "/// Constructs a new instance of the RTC driver for a PL031 device at the\n" " /// given base address.\n" @@ -20722,39 +22955,75 @@ msgid "" "process\n" " /// as device memory and not have any other aliases.\n" msgstr "" +"/// Construiește o nouă instanță a driverului RTC pentru un dispozitiv PL031 " +"la nivelul\n" +" /// adresa de bază dată.\n" +" ///\n" +" /// # Siguranță\n" +" ///\n" +" /// Adresa de bază dată trebuie să indice registrele de control MMIO ale " +"unui dispozitiv de tip\n" +" /// dispozitiv PL031, care trebuie să fie mapate în spațiul de adrese al " +"procesului\n" +" /// ca memorie a dispozitivului și să nu aibă alte pseudonime.\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:170 +#, fuzzy msgid "/// Reads the current RTC value.\n" -msgstr "" +msgstr "/// Citește valoarea curentă a RTC.\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:172 +#: src/exercises/bare-metal/solutions-afternoon.md:180 +#: src/exercises/bare-metal/solutions-afternoon.md:188 +#: src/exercises/bare-metal/solutions-afternoon.md:199 +#: src/exercises/bare-metal/solutions-afternoon.md:211 +#: src/exercises/bare-metal/solutions-afternoon.md:218 +#, fuzzy msgid "" "// Safe because we know that self.registers points to the control\n" " // registers of a PL031 device which is appropriately mapped.\n" msgstr "" +"// Sigur, deoarece știm că self.registers indică controlul\n" +" // registre ale unui dispozitiv PL031 care este cartografiat în mod " +"corespunzător.\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:177 +#, fuzzy msgid "" "/// Writes a match value. When the RTC value matches this then an interrupt\n" " /// will be generated (if it is enabled).\n" msgstr "" +"/// Scrie o valoare de potrivire. Atunci când valoarea RTC se potrivește cu " +"aceasta, se declanșează o întrerupere\n" +" /// va fi generată (dacă este activată).\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:185 +#, fuzzy msgid "" "/// Returns whether the match register matches the RTC value, whether or " "not\n" " /// the interrupt is enabled.\n" msgstr "" +"/// Întoarce dacă registrul de potrivire se potrivește cu valoarea RTC, dacă " +"este sau nu\n" +" /// întreruperea este activată.\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:194 +#, fuzzy msgid "" "/// Returns whether there is currently an interrupt pending.\n" " ///\n" " /// This should be true if and only if `matched` returns true and the\n" " /// interrupt is masked.\n" msgstr "" +"/// Returnează dacă există în prezent o întrerupere în așteptare.\n" +" ///\n" +" /// Acest lucru ar trebui să fie adevărat dacă și numai dacă `matched` " +"returnează true și dacă\n" +" /// întreruperea este mascată.\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:205 +#, fuzzy msgid "" "/// Sets or clears the interrupt mask.\n" " ///\n" @@ -20762,17 +23031,23 @@ msgid "" "the\n" " /// interrupt is disabled.\n" msgstr "" +"/// Setează sau șterge masca de întrerupere.\n" +" ///\n" +" /// Când masca este adevărată, întreruperea este activată; când este " +"falsă, întreruperea este activată\n" +" /// întreruperea este dezactivată.\n" -#: src/exercises/bare-metal/solutions-afternoon.md +#: src/exercises/bare-metal/solutions-afternoon.md:216 +#, fuzzy msgid "/// Clears a pending interrupt, if any.\n" -msgstr "" +msgstr "/// Șterge o întrerupere în așteptare, dacă există.\n" -#: src/concurrency.md +#: src/concurrency.md:1 #, fuzzy msgid "Welcome to Concurrency in Rust" msgstr "Bine ați venit la Concurrency în Rust" -#: src/concurrency.md +#: src/concurrency.md:3 #, fuzzy msgid "" "Rust has full support for concurrency using OS threads with mutexes and " @@ -20781,7 +23056,7 @@ msgstr "" "Rust are un suport complet pentru concurență folosind fire de execuție OS cu " "mutexuri și canale." -#: src/concurrency.md +#: src/concurrency.md:6 #, fuzzy msgid "" "The Rust type system plays an important role in making many concurrency bugs " @@ -20793,80 +23068,208 @@ msgstr "" "denumit _concurență fără frică_, deoarece vă puteți baza pe compilator " "pentru a asigura corectitudinea la momentul execuției." -#: src/concurrency/threads.md +#: src/concurrency.md:12 +msgid "" +"Rust lets us access OS concurrency toolkit: threads, sync. primitives, etc." +msgstr "" + +#: src/concurrency.md:13 +msgid "" +"The type system gives us safety for concurrency without any special features." +msgstr "" + +#: src/concurrency.md:14 +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:3 #, fuzzy msgid "Rust threads work similarly to threads in other languages:" msgstr "" "Firele de execuție din Rust funcționează în mod similar cu cele din alte " "limbaje:" -#: src/concurrency/threads.md +#: src/concurrency/threads.md:12 +#, fuzzy msgid "\"Count in thread: {i}!\"" -msgstr "" +msgstr "\"Numărătoarea în fir: {i}!\"" -#: src/concurrency/threads.md +#: src/concurrency/threads.md:18 +#, fuzzy msgid "\"Main thread: {i}\"" -msgstr "" +msgstr "\"Firul principal: {i}\"" -#: src/concurrency/threads.md +#: src/concurrency/threads.md:24 #, fuzzy msgid "Threads are all daemon threads, the main thread does not wait for them." msgstr "Firele sunt toate fire de tip daemon, firul principal nu le așteaptă." -#: src/concurrency/threads.md +#: src/concurrency/threads.md:25 #, fuzzy msgid "Thread panics are independent of each other." msgstr "Panica firelor este independentă una de cealaltă." -#: src/concurrency/threads.md +#: src/concurrency/threads.md:26 #, fuzzy msgid "Panics can carry a payload, which can be unpacked with `downcast_ref`." msgstr "" "Panicile pot transporta o sarcină utilă, care poate fi despachetată cu " "`downcast_ref`." -#: src/concurrency/threads.md +#: src/concurrency/threads.md:30 +msgid "Rust thread APIs look not too different from e.g. C++ ones." +msgstr "" + +#: src/concurrency/threads.md:32 #, fuzzy +msgid "Run the example." +msgstr "Rulați exemplul cu:" + +#: src/concurrency/threads.md:33 msgid "" -"Notice that the thread is stopped before it reaches 10 --- the main thread " -"is not waiting." +"5ms timing is loose enough that main and spawned threads stay mostly in " +"lockstep." +msgstr "" + +#: src/concurrency/threads.md:35 +msgid "Notice that the program ends before the spawned thread reaches 10!" msgstr "" -"Observați că firul este oprit înainte de a ajunge la 10 - firul principal nu " -"așteaptă." -#: src/concurrency/threads.md +#: src/concurrency/threads.md:36 +msgid "" +"This is because main ends the program and spawned threads do not make it " +"persist." +msgstr "" + +#: src/concurrency/threads.md:38 +msgid "Compare to pthreads/C++ std::thread/boost::thread if desired." +msgstr "" + +#: src/concurrency/threads.md:40 +msgid "How do we wait around for the spawned thread to complete?" +msgstr "" + +#: src/concurrency/threads.md:41 +#, fuzzy +msgid "" +"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html) " +"returns a `JoinHandle`. Look at the docs." +msgstr "" +"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) " +"utilizat pentru a construi o instanță implicită a unui tip." + +#: src/concurrency/threads.md:42 +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:44 #, fuzzy msgid "" "Use `let handle = thread::spawn(...)` and later `handle.join()` to wait for " -"the thread to finish." +"the thread to finish and have the program count all the way to 10." msgstr "" "Utilizați `let handle = thread::spawn(...)` și mai târziu `handle.join()` " "pentru a aștepta ca firul să se termine." -#: src/concurrency/threads.md +#: src/concurrency/threads.md:47 +msgid "Now what if we want to return a value?" +msgstr "" + +#: src/concurrency/threads.md:48 +msgid "Look at docs again:" +msgstr "" + +#: src/concurrency/threads.md:49 +#, fuzzy +msgid "" +"[`thread::spawn`](https://doc.rust-lang.org/std/thread/fn.spawn.html)'s " +"closure returns `T`" +msgstr "" +"Cu toate acestea, puteți utiliza un [scoped thread](https://doc.rust-lang." +"org/std/thread/fn.scope.html) pentru acest lucru:" + +#: src/concurrency/threads.md:50 +msgid "" +"`JoinHandle` [`.join()`](https://doc.rust-lang.org/std/thread/struct." +"JoinHandle.html#method.join) returns `thread::Result`" +msgstr "" + +#: src/concurrency/threads.md:52 #, fuzzy -msgid "Trigger a panic in the thread, notice how this doesn't affect `main`." +msgid "" +"Use the `Result` return value from `handle.join()` to get access to the " +"returned value." +msgstr "" +"Utilizați valoarea de returnare `Result` din `handle.join()` pentru a obține " +"acces la sarcina utilă de panică. Acesta este un moment bun pentru a vorbi " +"despre [`Any`](https://doc.rust-lang.org/std/any/index.html)." + +#: src/concurrency/threads.md:55 +msgid "Ok, what about the other case?" +msgstr "" + +#: src/concurrency/threads.md:56 +#, fuzzy +msgid "Trigger a panic in the thread. Note that this doesn't panic `main`." msgstr "" "Declanșează o panică în firul de discuție, observați cum acest lucru nu " "afectează `main`." -#: src/concurrency/threads.md +#: src/concurrency/threads.md:57 #, fuzzy msgid "" -"Use the `Result` return value from `handle.join()` to get access to the " -"panic payload. This is a good time to talk about [`Any`](https://doc.rust-" -"lang.org/std/any/index.html)." +"Access the panic payload. This is a good time to talk about [`Any`](https://" +"doc.rust-lang.org/std/any/index.html)." msgstr "" "Utilizați valoarea de returnare `Result` din `handle.join()` pentru a obține " "acces la sarcina utilă de panică. Acesta este un moment bun pentru a vorbi " "despre [`Any`](https://doc.rust-lang.org/std/any/index.html)." -#: src/concurrency/scoped-threads.md +#: src/concurrency/threads.md:59 +msgid "Now we can return values from threads! What about taking inputs?" +msgstr "" + +#: src/concurrency/threads.md:60 +msgid "Capture something by reference in the thread closure." +msgstr "" + +#: src/concurrency/threads.md:61 +msgid "An error message indicates we must move it." +msgstr "" + +#: src/concurrency/threads.md:62 +msgid "Move it in, see we can compute and then return a derived value." +msgstr "" + +#: src/concurrency/threads.md:64 +msgid "If we want to borrow?" +msgstr "" + +#: src/concurrency/threads.md:65 +msgid "" +"Main kills child threads when it returns, but another function would just " +"return and leave them running." +msgstr "" + +#: src/concurrency/threads.md:67 +msgid "That would be stack use-after-return, which violates memory safety!" +msgstr "" + +#: src/concurrency/threads.md:68 +msgid "How do we avoid this? see next slide." +msgstr "" + +#: src/concurrency/scoped-threads.md:3 #, fuzzy msgid "Normal threads cannot borrow from their environment:" msgstr "Firele normale nu pot împrumuta din mediul lor:" -#: src/concurrency/scoped-threads.md +#: src/concurrency/scoped-threads.md:20 #, fuzzy msgid "" "However, you can use a [scoped thread](https://doc.rust-lang.org/std/thread/" @@ -20875,7 +23278,7 @@ msgstr "" "Cu toate acestea, puteți utiliza un [scoped thread](https://doc.rust-lang." "org/std/thread/fn.scope.html) pentru acest lucru:" -#: src/concurrency/scoped-threads.md +#: src/concurrency/scoped-threads.md:40 #, fuzzy msgid "" "The reason for that is that when the `thread::scope` function completes, all " @@ -20884,7 +23287,7 @@ msgstr "" "Motivul este că, atunci când funcția `thread::scope` se finalizează, toate " "firele sunt garantate a fi unite, astfel încât pot returna date împrumutate." -#: src/concurrency/scoped-threads.md +#: src/concurrency/scoped-threads.md:42 #, fuzzy msgid "" "Normal Rust borrowing rules apply: you can either borrow mutably by one " @@ -20894,7 +23297,7 @@ msgstr "" "mutabil de către un singur fir, fie în mod imuabil de către orice număr de " "fire." -#: src/concurrency/channels.md +#: src/concurrency/channels.md:3 #, fuzzy msgid "" "Rust channels have two parts: a `Sender` and a `Receiver`. The two " @@ -20904,11 +23307,13 @@ msgstr "" "părți sunt conectate prin intermediul canalului, dar nu se văd decât " "punctele finale." -#: src/concurrency/channels.md +#: src/concurrency/channels.md:15 src/concurrency/channels.md:16 +#: src/concurrency/channels.md:20 +#, fuzzy msgid "\"Received: {:?}\"" -msgstr "" +msgstr "\"Recepționat: {:?}\"" -#: src/concurrency/channels.md +#: src/concurrency/channels.md:26 #, fuzzy msgid "" "`mpsc` stands for Multi-Producer, Single-Consumer. `Sender` and `SyncSender` " @@ -20919,7 +23324,7 @@ msgstr "" "implementează `Clone` (astfel încât să puteți face mai mulți producători), " "dar `Receiver` nu o face." -#: src/concurrency/channels.md +#: src/concurrency/channels.md:29 #, fuzzy msgid "" "`send()` and `recv()` return `Result`. If they return `Err`, it means the " @@ -20929,34 +23334,42 @@ msgstr "" "înseamnă că omologul `Sender` sau `Receiver` este abandonat și canalul este " "închis." -#: src/concurrency/channels/unbounded.md +#: src/concurrency/channels/unbounded.md:3 #, fuzzy msgid "You get an unbounded and asynchronous channel with `mpsc::channel()`:" msgstr "Obțineți un canal nemărginit și asincron cu `mpsc::channel()`:" -#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md +#: src/concurrency/channels/unbounded.md:16 +#: src/concurrency/channels/bounded.md:16 +#, fuzzy msgid "\"Message {i}\"" -msgstr "" +msgstr "\"Mesaj {i}\"" -#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md +#: src/concurrency/channels/unbounded.md:17 +#: src/concurrency/channels/bounded.md:17 +#, fuzzy msgid "\"{thread_id:?}: sent Message {i}\"" -msgstr "" +msgstr "\"{thread_id:?}: mesaj trimis {i}\"" -#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md +#: src/concurrency/channels/unbounded.md:19 +#: src/concurrency/channels/bounded.md:19 +#, fuzzy msgid "\"{thread_id:?}: done\"" -msgstr "" +msgstr "\"{thread_id:?}: terminat\"" -#: src/concurrency/channels/unbounded.md src/concurrency/channels/bounded.md +#: src/concurrency/channels/unbounded.md:24 +#: src/concurrency/channels/bounded.md:24 +#, fuzzy msgid "\"Main: got {msg}\"" -msgstr "" +msgstr "\"Main: got {msg}\"" -#: src/concurrency/channels/bounded.md +#: src/concurrency/channels/bounded.md:3 #, fuzzy msgid "" "With bounded (synchronous) channels, `send` can block the current thread:" msgstr "Cu canale limitate (sincrone), `send` poate bloca firul curent:" -#: src/concurrency/channels/bounded.md +#: src/concurrency/channels/bounded.md:31 #, fuzzy msgid "" "Calling `send` will block the current thread until there is space in the " @@ -20967,7 +23380,7 @@ msgstr "" "pentru noul mesaj. Firul poate fi blocat la nesfârșit dacă nimeni nu citește " "de pe canal." -#: src/concurrency/channels/bounded.md +#: src/concurrency/channels/bounded.md:34 #, fuzzy msgid "" "A call to `send` will abort with an error (that is why it returns `Result`) " @@ -20977,16 +23390,16 @@ msgstr "" "canalul este închis. Un canal este închis atunci când receptorul este " "abandonat." -#: src/concurrency/channels/bounded.md +#: src/concurrency/channels/bounded.md:36 #, fuzzy 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 `read`." +"Every send will block the current thread until another thread calls `recv`." msgstr "" "Un canal delimitat cu dimensiunea zero se numește \"canal de întâlnire\". " "Fiecare trimitere va bloca firul curent până când un alt fir va apela `read`." -#: src/concurrency/send-sync.md +#: src/concurrency/send-sync.md:3 #, fuzzy msgid "" "How does Rust know to forbid shared access across threads? The answer is in " @@ -20995,7 +23408,7 @@ msgstr "" "Cum știe Rust să interzică accesul partajat între fire de execuție? " "Răspunsul se află în două trăsături:" -#: src/concurrency/send-sync.md +#: src/concurrency/send-sync.md:6 #, fuzzy msgid "" "[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): a type `T` " @@ -21004,7 +23417,7 @@ msgstr "" "[`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html): un tip `T` " "este `Send` dacă este sigur să muți un `T` peste o limită de fir." -#: src/concurrency/send-sync.md +#: src/concurrency/send-sync.md:8 #, fuzzy msgid "" "[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): a type `T` " @@ -21013,7 +23426,7 @@ msgstr "" "[`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html): un tip `T` " "este `Sync` dacă este sigur să muți un `&T` peste o limită de fir." -#: src/concurrency/send-sync.md +#: src/concurrency/send-sync.md:11 #, fuzzy msgid "" "`Send` and `Sync` are [unsafe traits](../unsafe/unsafe-traits.md). The " @@ -21026,7 +23439,7 @@ msgstr "" "acestea conțin doar tipurile `Send` și `Sync`. De asemenea, le puteți " "implementa manual atunci când știți că este valabil." -#: src/concurrency/send-sync.md +#: src/concurrency/send-sync.md:21 #, fuzzy msgid "" "One can think of these traits as markers that the type has certain thread-" @@ -21035,14 +23448,14 @@ msgstr "" "Aceste trăsături pot fi considerate ca fiind indicatoare ale faptului că " "tipul are anumite proprietăți de siguranță a firelor." -#: src/concurrency/send-sync.md +#: src/concurrency/send-sync.md:23 #, fuzzy msgid "They can be used in the generic constraints as normal traits." msgstr "" "Acestea pot fi utilizate în cadrul constrângerilor generice ca și trăsături " "normale." -#: src/concurrency/send-sync/send.md +#: src/concurrency/send-sync/send.md:3 #, fuzzy msgid "" "A type `T` is [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html) " @@ -21051,7 +23464,7 @@ msgstr "" "Un tip `T` este [`Send`](https://doc.rust-lang.org/std/marker/trait.Send." "html) dacă este sigur să muți o valoare `T` către un alt fir." -#: src/concurrency/send-sync/send.md +#: src/concurrency/send-sync/send.md:5 #, fuzzy msgid "" "The effect of moving ownership to another thread is that _destructors_ will " @@ -21062,7 +23475,7 @@ msgstr "" "în acel fir. Așadar, întrebarea este când puteți aloca o valoare într-un fir " "și o puteți dezaloca în alt fir." -#: src/concurrency/send-sync/send.md +#: src/concurrency/send-sync/send.md:13 #, fuzzy msgid "" "As an example, a connection to the SQLite library must only be accessed from " @@ -21071,7 +23484,7 @@ msgstr "" "De exemplu, o conexiune la biblioteca SQLite trebuie să fie accesată numai " "de pe un singur fir de execuție." -#: src/concurrency/send-sync/sync.md +#: src/concurrency/send-sync/sync.md:3 #, fuzzy msgid "" "A type `T` is [`Sync`](https://doc.rust-lang.org/std/marker/trait.Sync.html) " @@ -21081,17 +23494,17 @@ msgstr "" "html) dacă este sigur să accesezi o valoare `T` din mai multe fire de " "execuție în același timp." -#: src/concurrency/send-sync/sync.md +#: src/concurrency/send-sync/sync.md:6 #, fuzzy msgid "More precisely, the definition is:" msgstr "Mai exact, definiția este:" -#: src/concurrency/send-sync/sync.md +#: src/concurrency/send-sync/sync.md:8 #, fuzzy msgid "`T` is `Sync` if and only if `&T` is `Send`" msgstr "`T` este `Sync` dacă și numai dacă `&T` este `Send`" -#: src/concurrency/send-sync/sync.md +#: src/concurrency/send-sync/sync.md:14 #, fuzzy msgid "" "This statement is essentially a shorthand way of saying that if a type is " @@ -21102,7 +23515,7 @@ msgstr "" "tip este sigur pentru utilizarea partajată, este, de asemenea, sigur pentru " "a trece referințe ale acestuia între fire." -#: src/concurrency/send-sync/sync.md +#: src/concurrency/send-sync/sync.md:18 #, fuzzy msgid "" "This is because if a type is Sync it means that it can be shared across " @@ -21118,49 +23531,54 @@ msgstr "" "pentru a fi mutată în alt fir, deoarece datele la care face referire pot fi " "accesate în siguranță din orice fir." -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:3 #, fuzzy msgid "`Send + Sync`" msgstr "`Send + Sync`" -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:5 #, fuzzy msgid "Most types you come across are `Send + Sync`:" msgstr "Majoritatea tipurilor pe care le întâlniți sunt de tip `Send + Sync`:" -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:7 #, fuzzy msgid "`i8`, `f32`, `bool`, `char`, `&str`, ..." msgstr "`i8`, `f32`, `bool`, `char`, `&str`, ..." -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:8 #, fuzzy msgid "`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ..." msgstr "`(T1, T2)`, `[T; N]`, `&[T]`, `struct { x: T }`, ..." -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:9 #, fuzzy msgid "`String`, `Option`, `Vec`, `Box`, ..." msgstr "`String`, `Option`, `Vec`, `Box`, ..." -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:10 #, fuzzy msgid "`Arc`: Explicitly thread-safe via atomic reference count." msgstr "" "`Arc`: În mod explicit, thread-safe prin numărul de referințe atomice." -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:11 #, fuzzy msgid "`Mutex`: Explicitly thread-safe via internal locking." msgstr "`Mutex`: În mod explicit, thread-safe prin blocare internă." -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:12 +#, fuzzy +msgid "`mpsc::Sender`: As of 1.72.0." +msgstr "`mpsc::Sender`" + +#: src/concurrency/send-sync/examples.md:13 #, fuzzy msgid "`AtomicBool`, `AtomicU8`, ...: Uses special atomic instructions." msgstr "" "`AtomicBool`, `AtomicU8`, ....: Utilizează instrucțiuni atomice speciale." -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:15 #, fuzzy msgid "" "The generic types are typically `Send + Sync` when the type parameters are " @@ -21169,12 +23587,12 @@ msgstr "" "Tipurile generice sunt de obicei `Send + Sync` atunci când parametrii de tip " "sunt `Send + Sync`." -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:18 #, fuzzy msgid "`Send + !Sync`" msgstr "`Send + !Sync`" -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:20 #, fuzzy msgid "" "These types can be moved to other threads, but they're not thread-safe. " @@ -21183,32 +23601,27 @@ msgstr "" "Aceste tipuri pot fi mutate în alte fire de execuție, dar nu sunt sigure " "pentru fire de execuție. De obicei, din cauza mutabilității interioare:" -#: src/concurrency/send-sync/examples.md -#, fuzzy -msgid "`mpsc::Sender`" -msgstr "`mpsc::Sender`" - -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:23 #, fuzzy msgid "`mpsc::Receiver`" msgstr "`mpsc::Receiver`" -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:24 #, fuzzy msgid "`Cell`" msgstr "`Celula`" -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:25 #, fuzzy msgid "`RefCell`" msgstr "`RefCell`" -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:27 #, fuzzy msgid "`!Send + Sync`" msgstr "`!Send + Sync`" -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:29 #, fuzzy msgid "" "These types are thread-safe, but they cannot be moved to another thread:" @@ -21216,7 +23629,7 @@ msgstr "" "Aceste tipuri sunt sigure pentru firul de execuție, dar nu pot fi mutate în " "alt fir de execuție:" -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:31 #, fuzzy msgid "" "`MutexGuard`: Uses OS level primitives which must be deallocated on " @@ -21225,19 +23638,19 @@ msgstr "" "`MutexGuard`: Utilizează primitive la nivelul sistemului de operare " "care trebuie să fie dezalocate pe firul care le-a creat." -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:34 #, fuzzy msgid "`!Send + !Sync`" msgstr "`!Send +Sync`" -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:36 #, fuzzy msgid "These types are not thread-safe and cannot be moved to other threads:" msgstr "" "Aceste tipuri nu sunt sigure pentru fire de execuție și nu pot fi mutate în " "alte fire de execuție:" -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:38 #, fuzzy msgid "" "`Rc`: each `Rc` has a reference to an `RcBox`, which contains a non-" @@ -21246,7 +23659,7 @@ msgstr "" "`Rc`: fiecare `Rc` are o referință la un `RcBox`, care conține un " "număr de referințe neatomice." -#: src/concurrency/send-sync/examples.md +#: src/concurrency/send-sync/examples.md:40 #, fuzzy msgid "" "`*const T`, `*mut T`: Rust assumes raw pointers may have special concurrency " @@ -21255,7 +23668,7 @@ msgstr "" "`*const T`, `*mut T`: Rust presupune că indicatoarele brute pot avea " "considerații speciale privind concurența." -#: src/concurrency/shared_state.md +#: src/concurrency/shared_state.md:3 #, fuzzy msgid "" "Rust uses the type system to enforce synchronization of shared data. This is " @@ -21264,7 +23677,7 @@ msgstr "" "Rust utilizează sistemul de tipuri pentru a impune sincronizarea datelor " "partajate. Acest lucru se face în principal prin intermediul a două tipuri:" -#: src/concurrency/shared_state.md +#: src/concurrency/shared_state.md:6 #, fuzzy msgid "" "[`Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html), atomic " @@ -21275,7 +23688,7 @@ msgstr "" "atomică numărată `T`: se ocupă de partajarea între fire și are grijă să " "dezalocalizeze `T` atunci când se renunță la ultima referință," -#: src/concurrency/shared_state.md +#: src/concurrency/shared_state.md:8 #, fuzzy msgid "" "[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): ensures " @@ -21284,7 +23697,7 @@ msgstr "" "[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html): asigură " "accesul reciproc exclusiv la valoarea `T`." -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared_state/arc.md:3 #, fuzzy msgid "" "[`Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html) allows shared " @@ -21293,15 +23706,19 @@ msgstr "" "[`Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html) permite " "accesul partajat numai pentru citire prin intermediul `Arc::clone`:" -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared_state/arc.md:16 +#, fuzzy msgid "\"{thread_id:?}: {v:?}\"" -msgstr "" +msgstr "\"{thread_id:?}: {v:?}\"" -#: src/concurrency/shared_state/arc.md src/concurrency/shared_state/example.md +#: src/concurrency/shared_state/arc.md:21 +#: src/concurrency/shared_state/example.md:17 +#: src/concurrency/shared_state/example.md:45 +#, fuzzy msgid "\"v: {v:?}\"" -msgstr "" +msgstr "\"v: {v:?}\"" -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared_state/arc.md:29 #, fuzzy msgid "" "`Arc` stands for \"Atomic Reference Counted\", a thread safe version of `Rc` " @@ -21310,7 +23727,7 @@ msgstr "" "`Arc` este acronimul de la \"Atomic Reference Counted\", o versiune thread " "safe a `Rc` care utilizează operații atomice." -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared_state/arc.md:31 #, fuzzy msgid "" "`Arc` implements `Clone` whether or not `T` does. It implements `Send` " @@ -21320,7 +23737,7 @@ msgstr "" "Implementează `Send` și `Sync` dacă și numai dacă `T` le implementează pe " "amândouă." -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared_state/arc.md:33 #, fuzzy msgid "" "`Arc::clone()` has the cost of atomic operations that get executed, but " @@ -21329,7 +23746,7 @@ msgstr "" "`Arc::clone()` are costul operațiunilor atomice care se execută, dar după " "aceea utilizarea lui `T` este gratuită." -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared_state/arc.md:35 #, fuzzy msgid "" "Beware of reference cycles, `Arc` does not use a garbage collector to detect " @@ -21338,12 +23755,12 @@ msgstr "" "Atenție la ciclurile de referință, `Arc` nu folosește un garbage collector " "pentru a le detecta." -#: src/concurrency/shared_state/arc.md +#: src/concurrency/shared_state/arc.md:37 #, fuzzy msgid "`std::sync::Weak` can help." msgstr "`std::sync::Weak` poate fi de ajutor." -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared_state/mutex.md:3 #, fuzzy msgid "" "[`Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html) ensures " @@ -21355,11 +23772,13 @@ msgstr "" "excluderea reciprocă _și_ permite accesul mutabil la `T` în spatele unei " "interfețe de numai citire:" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared_state/mutex.md:12 +#: src/concurrency/shared_state/mutex.md:19 +#, fuzzy msgid "\"v: {:?}\"" -msgstr "" +msgstr "\"v: {:?}\"" -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared_state/mutex.md:23 #, fuzzy msgid "" "Notice how we have a [`impl Sync for Mutex`](https://doc.rust-" @@ -21370,7 +23789,7 @@ msgstr "" "Mutex`](https://doc.rust-lang.org/std/sync/struct.Mutex.html#impl-Sync-" "for-Mutex%3CT%3E)." -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared_state/mutex.md:32 #, fuzzy msgid "" "`Mutex` in Rust looks like a collection with just one element --- the " @@ -21378,7 +23797,7 @@ msgid "" msgstr "" "`Mutex` în Rust arată ca o colecție cu un singur element - datele protejate." -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared_state/mutex.md:34 #, fuzzy msgid "" "It is not possible to forget to acquire the mutex before accessing the " @@ -21387,7 +23806,7 @@ msgstr "" "Nu este posibil să se uite să se achiziționeze mutexul înainte de a accesa " "datele protejate." -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared_state/mutex.md:36 #, fuzzy msgid "" "You can get an `&mut T` from an `&Mutex` by taking the lock. The " @@ -21397,7 +23816,7 @@ msgstr "" "blocaj. `MutexGuard` se asigură că `&mut T` nu supraviețuiește mai mult " "decât blocajul deținut." -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared_state/mutex.md:38 #, fuzzy msgid "" "`Mutex` implements both `Send` and `Sync` iff (if and only if) `T` " @@ -21406,17 +23825,17 @@ msgstr "" "`Mutex` implementează atât `Send` cât și `Sync` dacă (dacă și numai dacă) " "`T` implementează `Send`." -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared_state/mutex.md:40 #, fuzzy msgid "A read-write lock counterpart: `RwLock`." msgstr "O contraparte de blocare la citire-scriere - `RwLock`." -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared_state/mutex.md:41 #, fuzzy msgid "Why does `lock()` return a `Result`?" -msgstr "De ce `lock()` returnează un `Result`?" +msgstr "De ce `lock()` returnează `Result`? " -#: src/concurrency/shared_state/mutex.md +#: src/concurrency/shared_state/mutex.md:42 #, fuzzy msgid "" "If the thread that held the `Mutex` panicked, the `Mutex` becomes " @@ -21432,26 +23851,25 @@ msgstr "" "html). Puteți apela `into_inner()` la eroare pentru a recupera datele " "indiferent de situație." -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared_state/example.md:3 #, fuzzy msgid "Let us see `Arc` and `Mutex` in action:" msgstr "Să vedem `Arc` și `Mutex` în acțiune:" -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared_state/example.md:6 +#, fuzzy msgid "// use std::sync::{Arc, Mutex};\n" -msgstr "" +msgstr "// folosiți std::sync::{Arc, Mutex};\n" -#: src/concurrency/shared_state/example.md -#, fuzzy +#: src/concurrency/shared_state/example.md:23 msgid "Possible solution:" msgstr "O posibilă soluție:" -#: src/concurrency/shared_state/example.md -#, fuzzy +#: src/concurrency/shared_state/example.md:49 msgid "Notable parts:" msgstr "Părți notabile:" -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared_state/example.md:51 #, fuzzy msgid "" "`v` is wrapped in both `Arc` and `Mutex`, because their concerns are " @@ -21460,7 +23878,7 @@ msgstr "" "`v` este înfășurat atât în `Arc` cât și în `Mutex`, deoarece preocupările " "lor sunt ortogonale." -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared_state/example.md:53 #, fuzzy msgid "" "Wrapping a `Mutex` in an `Arc` is a common pattern to share mutable state " @@ -21469,7 +23887,7 @@ msgstr "" "Înfășurarea unui `Mutex` într-un `Arc` este un model comun de partajare a " "stării mutabile între fire." -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared_state/example.md:55 #, fuzzy msgid "" "`v: Arc<_>` needs to be cloned as `v2` before it can be moved into another " @@ -21479,7 +23897,7 @@ msgstr "" "un alt fir de execuție. Rețineți că `move` a fost adăugat la semnătura " "lambda." -#: src/concurrency/shared_state/example.md +#: src/concurrency/shared_state/example.md:57 #, fuzzy msgid "" "Blocks are introduced to narrow the scope of the `LockGuard` as much as " @@ -21488,17 +23906,17 @@ msgstr "" "Blocurile sunt introduse pentru a restrânge cât mai mult posibil domeniul de " "aplicare al `LockGuard`." -#: src/exercises/concurrency/morning.md +#: src/exercises/concurrency/morning.md:3 #, fuzzy msgid "Let us practice our new concurrency skills with" msgstr "Să ne exersăm noile noastre abilități de concurență cu" -#: src/exercises/concurrency/morning.md +#: src/exercises/concurrency/morning.md:5 #, fuzzy msgid "Dining philosophers: a classic problem in concurrency." msgstr "Filozofii care mănâncă: o problemă clasică în concurență." -#: src/exercises/concurrency/morning.md +#: src/exercises/concurrency/morning.md:7 #, fuzzy msgid "" "Multi-threaded link checker: a larger project where you'll use Cargo to " @@ -21508,14 +23926,14 @@ msgstr "" "folosi Cargo pentru a descărca dependențele și apoi pentru a verifica " "legăturile în paralel." -#: src/exercises/concurrency/dining-philosophers.md +#: src/exercises/concurrency/dining-philosophers.md:3 #, fuzzy msgid "The dining philosophers problem is a classic problem in concurrency:" msgstr "" "Problema filozofilor care servesc masa este o problemă clasică în domeniul " "concurenței:" -#: src/exercises/concurrency/dining-philosophers.md +#: src/exercises/concurrency/dining-philosophers.md:5 #, fuzzy msgid "" "Five philosophers dine together at the same table. Each philosopher has " @@ -21537,7 +23955,7 @@ msgstr "" "gândesc, nu mănâncă. După ce un filozof individual termină de mâncat, el va " "pune jos ambele furculițe." -#: src/exercises/concurrency/dining-philosophers.md +#: src/exercises/concurrency/dining-philosophers.md:13 #, fuzzy msgid "" "You will need a local [Cargo installation](../../cargo/running-locally.md) " @@ -21549,98 +23967,113 @@ msgstr "" "`src/main.rs`, completați spațiile goale și testați dacă `cargo run` nu se " "blochează:" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/exercises/concurrency/dining-philosophers.md:28 +#: src/exercises/concurrency/dining-philosophers-async.md:23 +#, fuzzy msgid "" "// left_fork: ...\n" " // right_fork: ...\n" " // thoughts: ...\n" msgstr "" +"// left_fork: ...\n" +" // right_fork: ...\n" +" // thoughts: ...\n" -#: 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/exercises/concurrency/dining-philosophers.md:36 +#: src/exercises/concurrency/solutions-morning.md:24 +#: src/exercises/concurrency/dining-philosophers-async.md:31 +#: src/exercises/concurrency/solutions-afternoon.md:25 +#, fuzzy msgid "\"Eureka! {} has a new idea!\"" -msgstr "" +msgstr "\"Eureka! {} are o idee nouă!\"" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/dining-philosophers.md:41 +#: src/exercises/concurrency/solutions-afternoon.md:33 +#, fuzzy msgid "// Pick up forks...\n" -msgstr "" +msgstr "// Ridicați furculițele...\n" -#: 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/exercises/concurrency/dining-philosophers.md:42 +#: src/exercises/concurrency/solutions-morning.md:33 +#: src/exercises/concurrency/dining-philosophers-async.md:38 +#: src/exercises/concurrency/solutions-afternoon.md:53 +#, fuzzy msgid "\"{} is eating...\"" -msgstr "" +msgstr "\"{} mănâncă...\"" -#: 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/exercises/concurrency/dining-philosophers.md:48 +#: src/exercises/concurrency/solutions-morning.md:39 +#: src/exercises/concurrency/dining-philosophers-async.md:44 +#: src/exercises/concurrency/solutions-afternoon.md:61 #, fuzzy msgid "\"Socrates\"" msgstr "Lăzi HAL" -#: 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/exercises/concurrency/dining-philosophers.md:48 +#: src/exercises/concurrency/solutions-morning.md:39 +#: src/exercises/concurrency/dining-philosophers-async.md:44 +#: src/exercises/concurrency/solutions-afternoon.md:61 +#, fuzzy msgid "\"Hypatia\"" -msgstr "" +msgstr "\"Hypatia\"" -#: 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/exercises/concurrency/dining-philosophers.md:48 +#: src/exercises/concurrency/solutions-morning.md:39 +#: src/exercises/concurrency/dining-philosophers-async.md:44 +#: src/exercises/concurrency/solutions-afternoon.md:61 +#, fuzzy msgid "\"Plato\"" -msgstr "" +msgstr "\"Platon\"" -#: 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/exercises/concurrency/dining-philosophers.md:48 +#: src/exercises/concurrency/solutions-morning.md:39 +#: src/exercises/concurrency/dining-philosophers-async.md:44 +#: src/exercises/concurrency/solutions-afternoon.md:61 +#, fuzzy msgid "\"Aristotle\"" -msgstr "" +msgstr "\"Aristotel\"" -#: 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/exercises/concurrency/dining-philosophers.md:48 +#: src/exercises/concurrency/solutions-morning.md:39 +#: src/exercises/concurrency/dining-philosophers-async.md:44 +#: src/exercises/concurrency/solutions-afternoon.md:61 +#, fuzzy msgid "\"Pythagoras\"" -msgstr "" +msgstr "\"Pythagoras\"" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/dining-philosophers.md:51 +#: src/exercises/concurrency/dining-philosophers-async.md:48 +#: src/exercises/concurrency/solutions-afternoon.md:65 +#, fuzzy msgid "// Create forks\n" -msgstr "" +msgstr "// Creați furci\n" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/dining-philosophers.md:53 +#: src/exercises/concurrency/dining-philosophers-async.md:50 +#: src/exercises/concurrency/solutions-afternoon.md:69 +#, fuzzy msgid "// Create philosophers\n" -msgstr "" +msgstr "// Creați filosofi\n" -#: src/exercises/concurrency/dining-philosophers.md +#: src/exercises/concurrency/dining-philosophers.md:55 +#, fuzzy msgid "// Make each of them think and eat 100 times\n" msgstr "" +"// Fă-i pe fiecare dintre ei să gândească și să mănânce de 100 de ori\n" -#: src/exercises/concurrency/dining-philosophers.md -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/dining-philosophers.md:57 +#: src/exercises/concurrency/dining-philosophers-async.md:54 +#: src/exercises/concurrency/solutions-afternoon.md:97 +#, fuzzy msgid "// Output their thoughts\n" -msgstr "" +msgstr "// Emiteți gândurile lor\n" -#: src/exercises/concurrency/dining-philosophers.md +#: src/exercises/concurrency/dining-philosophers.md:61 #, fuzzy msgid "You can use the following `Cargo.toml`:" msgstr "Puteți utiliza următorul `Cargo.toml`:" -#: src/exercises/concurrency/dining-philosophers.md +#: src/exercises/concurrency/dining-philosophers.md:65 #, fuzzy msgid "" "```toml\n" @@ -21657,7 +24090,7 @@ msgstr "" "edition = \"2021\"\n" "```" -#: src/exercises/concurrency/link-checker.md +#: src/exercises/concurrency/link-checker.md:3 #, fuzzy msgid "" "Let us use our new knowledge to create a multi-threaded link checker. It " @@ -21671,17 +24104,20 @@ msgstr "" "mod recursiv alte pagini din același domeniu și să continue să facă acest " "lucru până când toate paginile sunt validate." -#: src/exercises/concurrency/link-checker.md -#, fuzzy +#: src/exercises/concurrency/link-checker.md:8 msgid "" "For this, you will need an HTTP client such as [`reqwest`](https://docs.rs/" -"reqwest/). Create a new Cargo project and `reqwest` it as a dependency with:" +"reqwest/). You will also need a way to find links, we can use [`scraper`]" +"(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, " +"we will use [`thiserror`](https://docs.rs/thiserror/)." msgstr "" -"Pentru aceasta, veți avea nevoie de un client HTTP, cum ar fi [`reqwest`]" -"(https://docs.rs/reqwest/). Creați un nou proiect Cargo și `reqwest` ca " -"dependență cu:" -#: src/exercises/concurrency/link-checker.md +#: src/exercises/concurrency/link-checker.md:12 +#, fuzzy +msgid "Create a new Cargo project and `reqwest` it as a dependency with:" +msgstr "Creați un nou proiect Cargo și adăugați următoarele dependențe:" + +#: src/exercises/concurrency/link-checker.md:22 #, fuzzy msgid "" "If `cargo add` fails with `error: no such subcommand`, then please edit the " @@ -21691,25 +24127,7 @@ msgstr "" "editați manual fișierul `Cargo.toml`. Adăugați dependențele enumerate mai " "jos." -#: src/exercises/concurrency/link-checker.md -#, fuzzy -msgid "" -"You will also need a way to find links. We can use [`scraper`](https://docs." -"rs/scraper/) for that:" -msgstr "" -"Veți avea nevoie, de asemenea, de o modalitate de a găsi legături. Putem " -"folosi [`scraper`](https://docs.rs/scraper/) pentru asta:" - -#: src/exercises/concurrency/link-checker.md -#, fuzzy -msgid "" -"Finally, we'll need some way of handling errors. We use [`thiserror`]" -"(https://docs.rs/thiserror/) for that:" -msgstr "" -"În cele din urmă, vom avea nevoie de o modalitate de gestionare a erorilor. " -"Pentru aceasta, vom folosi [`thiserror`](https://docs.rs/thiserror/):" - -#: src/exercises/concurrency/link-checker.md +#: src/exercises/concurrency/link-checker.md:25 #, fuzzy msgid "" "The `cargo add` calls will update the `Cargo.toml` file to look like this:" @@ -21717,7 +24135,7 @@ msgstr "" "Apelurile `cargo add` vor actualiza fișierul `Cargo.toml` astfel încât să " "arate astfel:" -#: src/exercises/concurrency/link-checker.md +#: src/exercises/concurrency/link-checker.md:29 #, fuzzy msgid "" "```toml\n" @@ -21748,7 +24166,7 @@ msgstr "" "thiserror = \"1.0.37\"\n" "```" -#: src/exercises/concurrency/link-checker.md +#: src/exercises/concurrency/link-checker.md:42 #, fuzzy msgid "" "You can now download the start page. Try with a small site such as `https://" @@ -21757,55 +24175,63 @@ msgstr "" "Acum puteți descărca pagina de start. Încercați cu un site mic, cum ar fi " "`https://www.google.org/`." -#: src/exercises/concurrency/link-checker.md +#: src/exercises/concurrency/link-checker.md:45 #, fuzzy msgid "Your `src/main.rs` file should look something like this:" msgstr "Fișierul dvs. `src/main.rs` ar trebui să arate cam așa:" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/link-checker.md:57 +#: src/exercises/concurrency/solutions-morning.md:97 +#, fuzzy msgid "\"request error: {0}\"" -msgstr "" +msgstr "\"eroare de solicitare: {0}\"" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/link-checker.md:59 +#: src/exercises/concurrency/solutions-morning.md:99 +#, fuzzy msgid "\"bad http response: {0}\"" -msgstr "" +msgstr "\"bad http response: {0}\"" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/link-checker.md:70 +#: src/exercises/concurrency/solutions-morning.md:110 +#, fuzzy msgid "\"Checking {:#}\"" -msgstr "" +msgstr "Verificarea împrumuturilor" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/link-checker.md:88 +#: src/exercises/concurrency/solutions-morning.md:128 +#, fuzzy msgid "\"href\"" -msgstr "" +msgstr "\"href\"" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/link-checker.md:95 +#: src/exercises/concurrency/solutions-morning.md:135 +#, fuzzy msgid "\"On {base_url:#}: ignored unparsable {href:?}: {err}\"" -msgstr "" +msgstr "\"On {base_url:#}: ignorat neparsabil {href:?}: {err}\"" -#: src/exercises/concurrency/link-checker.md -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/link-checker.md:104 +#: src/exercises/concurrency/solutions-morning.md:245 +#, fuzzy msgid "\"https://www.google.org\"" -msgstr "" +msgstr "\"https://www.google.org\"" -#: src/exercises/concurrency/link-checker.md +#: src/exercises/concurrency/link-checker.md:107 +#, fuzzy msgid "\"Links: {links:#?}\"" -msgstr "" +msgstr "\"Link-uri: {links:#?}\"" -#: src/exercises/concurrency/link-checker.md +#: src/exercises/concurrency/link-checker.md:108 +#, fuzzy msgid "\"Could not extract links: {err:#}\"" -msgstr "" +msgstr "\"Could not extract links: {err:#}\"" -#: src/exercises/concurrency/link-checker.md +#: src/exercises/concurrency/link-checker.md:113 #, fuzzy msgid "Run the code in `src/main.rs` with" msgstr "Rulați codul din `src/main.rs` cu" -#: src/exercises/concurrency/link-checker.md +#: src/exercises/concurrency/link-checker.md:121 #, fuzzy msgid "" "Use threads to check the links in parallel: send the URLs to be checked to a " @@ -21815,7 +24241,7 @@ msgstr "" "URL-urile care trebuie verificate pe un canal și lăsați câteva fire de " "execuție să verifice URL-urile în paralel." -#: src/exercises/concurrency/link-checker.md +#: src/exercises/concurrency/link-checker.md:123 #, fuzzy msgid "" "Extend this to recursively extract links from all pages on the `www.google." @@ -21827,70 +24253,84 @@ msgstr "" "aproximativ 100 de pagini, astfel încât să nu ajungeți să fiți blocat de " "site." -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/solutions-morning.md:1 #, fuzzy msgid "Concurrency Morning Exercise" msgstr "Concurrency Exercițiu de dimineață" -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/solutions-morning.md:5 #, fuzzy msgid "([back to exercise](dining-philosophers.md))" msgstr "([back to exercise](dining-philosophers.md))" -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/solutions-morning.md:29 +#, fuzzy msgid "\"{} is trying to eat\"" -msgstr "" +msgstr "\"{} încearcă să mănânce\"" -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/solutions-morning.md:53 +#, fuzzy 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 "" +"// Pentru a evita un blocaj, trebuie să rupem simetria\n" +" // undeva. Acest lucru va schimba bifurcațiile fără a dezinitializa\n" +" // niciuna dintre ele.\n" -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/solutions-morning.md:77 +#, fuzzy msgid "\"{thought}\"" -msgstr "" +msgstr "\"{thought}\"" -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/solutions-morning.md:82 #, fuzzy msgid "Link Checker" msgstr "Verificator de legături" -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/solutions-morning.md:84 #, fuzzy msgid "([back to exercise](link-checker.md))" msgstr "([back to exercise](link-checker.md))" -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/solutions-morning.md:154 +#, fuzzy msgid "" "/// Determine whether links within the given page should be extracted.\n" -msgstr "" +msgstr "/// Determină dacă legăturile din pagina dată trebuie extrase.\n" -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/solutions-morning.md:162 +#, fuzzy msgid "" "/// Mark the given page as visited, returning false if it had already\n" " /// been visited.\n" msgstr "" +"/// Marchează pagina dată ca fiind vizitată, returnând false dacă a fost " +"deja vizitată\n" +" /// fost vizitată.\n" -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/solutions-morning.md:188 +#, fuzzy msgid "// The sender got dropped. No more commands coming in.\n" -msgstr "" +msgstr "// Expeditorul a fost abandonat. Nu mai vin comenzi.\n" -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/solutions-morning.md:229 +#, fuzzy msgid "\"Got crawling error: {:#}\"" -msgstr "" +msgstr "\"Am primit o eroare de crawling: {:#}\"" -#: src/exercises/concurrency/solutions-morning.md +#: src/exercises/concurrency/solutions-morning.md:247 +#, fuzzy msgid "\"Bad URLs: {:#?}\"" -msgstr "" +msgstr "\"URL-uri proaste: {:#?}\"" -#: src/async.md +#: src/async.md:1 #, fuzzy msgid "Async Rust" msgstr "Async Rust" -#: src/async.md +#: src/async.md:3 #, fuzzy msgid "" "\"Async\" is a concurrency model where multiple tasks are executed " @@ -21908,7 +24348,7 @@ msgstr "" "operare per sarcină sunt foarte scăzute, iar sistemele de operare oferă " "primitive pentru identificarea eficientă a I/O care pot continua." -#: src/async.md +#: src/async.md:10 #, fuzzy msgid "" "Rust's asynchronous operation is based on \"futures\", which represent work " @@ -21919,7 +24359,7 @@ msgstr "" "munca ce poate fi finalizată în viitor. Futures sunt \"interogate\" până " "când semnalează că sunt finalizate." -#: src/async.md +#: src/async.md:14 #, fuzzy msgid "" "Futures are polled by an async runtime, and several different runtimes are " @@ -21928,7 +24368,7 @@ msgstr "" "Futures sunt interogate de un timp de execuție asincron și sunt disponibile " "mai multe timpuri de execuție diferite." -#: src/async.md +#: src/async.md:19 #, fuzzy msgid "" "Python has a similar model in its `asyncio`. However, its `Future` type is " @@ -21939,7 +24379,7 @@ msgstr "" "`Future` se bazează pe callback și nu pe polled. Programele asincrone din " "Python necesită o \"buclă\", similară cu un timp de execuție în Rust." -#: src/async.md +#: src/async.md:23 #, fuzzy msgid "" "JavaScript's `Promise` is similar, but again callback-based. The language " @@ -21950,7 +24390,7 @@ msgstr "" "Timpul de execuție al limbajului implementează bucla de evenimente, astfel " "încât multe dintre detaliile rezolvării promisiunilor sunt ascunse." -#: src/async/async-await.md +#: src/async/async-await.md:3 #, fuzzy msgid "" "At a high level, async Rust code looks very much like \"normal\" sequential " @@ -21959,11 +24399,12 @@ msgstr "" "La un nivel înalt, codul Rust asincron seamănă foarte mult cu codul " "secvențial \"normal\":" -#: src/async/async-await.md +#: src/async/async-await.md:10 +#, fuzzy msgid "\"Count is: {i}!\"" -msgstr "" +msgstr "\"Contele este: {i}!\"" -#: src/async/async-await.md +#: src/async/async-await.md:27 #, fuzzy msgid "" "Note that this is a simplified example to show the syntax. There is no long " @@ -21972,18 +24413,18 @@ msgstr "" "Rețineți că acesta este un exemplu simplificat pentru a arăta sintaxa. Nu " "există nicio operațiune de lungă durată sau vreo concurență reală!" -#: src/async/async-await.md +#: src/async/async-await.md:30 #, fuzzy msgid "What is the return type of an async call?" msgstr "Care este tipul de returnare al unui apel asincron?" -#: src/async/async-await.md +#: src/async/async-await.md:31 #, fuzzy msgid "Use `let future: () = async_main(10);` in `main` to see the type." msgstr "" "Utilizați `let future: () = async_main(10);` în `main` pentru a vedea tipul." -#: src/async/async-await.md +#: src/async/async-await.md:33 #, fuzzy msgid "" "The \"async\" keyword is syntactic sugar. The compiler replaces the return " @@ -21992,7 +24433,7 @@ msgstr "" "Cuvântul cheie \"async\" este un zahăr sintactic. Compilatorul înlocuiește " "tipul return cu un future." -#: src/async/async-await.md +#: src/async/async-await.md:36 #, fuzzy msgid "" "You cannot make `main` async, without additional instructions to the " @@ -22001,7 +24442,7 @@ msgstr "" "Nu puteți face ca `main` să fie asincron, fără instrucțiuni suplimentare " "pentru compilator cu privire la modul de utilizare a viitorului returnat." -#: src/async/async-await.md +#: src/async/async-await.md:39 #, fuzzy msgid "" "You need an executor to run async code. `block_on` blocks the current thread " @@ -22010,7 +24451,7 @@ msgstr "" "Aveți nevoie de un executor pentru a rula cod asincron. `block_on` blochează " "firul curent până când viitorul furnizat a fost executat până la finalizare." -#: src/async/async-await.md +#: src/async/async-await.md:42 #, fuzzy msgid "" "`.await` asynchronously waits for the completion of another operation. " @@ -22019,7 +24460,7 @@ msgstr "" "`.await` așteaptă în mod asincron finalizarea unei alte operațiuni. Spre " "deosebire de `block_on`, `.await` nu blochează firul curent." -#: src/async/async-await.md +#: src/async/async-await.md:45 #, fuzzy msgid "" "`.await` can only be used inside an `async` function (or block; these are " @@ -22028,7 +24469,7 @@ msgstr "" "`.await` poate fi folosit numai în interiorul unei funcții `async` (sau " "bloc; acestea sunt prezentate mai târziu)." -#: src/async/futures.md +#: src/async/futures.md:3 #, fuzzy msgid "" "[`Future`](https://doc.rust-lang.org/std/future/trait.Future.html) is a " @@ -22041,7 +24482,7 @@ msgstr "" "să nu fie încă finalizată. Un viitor poate fi interogat, iar `poll` " "returnează un [`Poll`](https://doc.rust-lang.org/std/task/enum.Poll.html)." -#: src/async/futures.md +#: src/async/futures.md:23 #, fuzzy msgid "" "An async function returns an `impl Future`. It's also possible (but " @@ -22054,7 +24495,7 @@ msgstr "" "De exemplu, `JoinHandle` returnat de `tokio::spawn` implementează `Future` " "pentru a permite îmbinarea cu acesta." -#: src/async/futures.md +#: src/async/futures.md:27 #, fuzzy msgid "" "The `.await` keyword, applied to a Future, causes the current async function " @@ -22064,7 +24505,7 @@ msgstr "" "curentă să se oprească până când Future-ul este gata și apoi evaluează la " "ieșire." -#: src/async/futures.md +#: src/async/futures.md:32 #, fuzzy msgid "" "The `Future` and `Poll` types are implemented exactly as shown; click the " @@ -22073,7 +24514,7 @@ msgstr "" "Tipurile `Future` și `Poll` sunt implementate exact așa cum se arată; faceți " "clic pe linkuri pentru a vedea implementările din documentație." -#: src/async/futures.md +#: src/async/futures.md:35 #, fuzzy msgid "" "We will not get to `Pin` and `Context`, as we will focus on writing async " @@ -22083,7 +24524,7 @@ msgstr "" "de cod asincron, mai degrabă decât pe construirea de noi primitive " "asincrone. Pe scurt:" -#: src/async/futures.md +#: src/async/futures.md:38 #, fuzzy msgid "" "`Context` allows a Future to schedule itself to be polled again when an " @@ -22092,7 +24533,7 @@ msgstr "" "`Context` permite unui Future să se programeze pentru a fi interogat din nou " "atunci când are loc un eveniment." -#: src/async/futures.md +#: src/async/futures.md:41 #, fuzzy msgid "" "`Pin` ensures that the Future isn't moved in memory, so that pointers into " @@ -22103,7 +24544,7 @@ msgstr "" "indicatorii către acel viitor rămân valabili. Acest lucru este necesar " "pentru a permite ca referințele să rămână valabile după un `.await`." -#: src/async/runtimes.md +#: src/async/runtimes.md:3 #, fuzzy msgid "" "A _runtime_ provides support for performing operations asynchronously (a " @@ -22115,7 +24556,7 @@ msgstr "" "Rust nu are un timp de execuție \"încorporat\", dar sunt disponibile mai " "multe opțiuni:" -#: src/async/runtimes.md +#: src/async/runtimes.md:7 #, fuzzy msgid "" "[Tokio](https://tokio.rs/): performant, with a well-developed ecosystem of " @@ -22126,7 +24567,7 @@ msgstr "" "funcționalități precum [Hyper](https://hyper.rs/) pentru HTTP sau [Tonic]" "(https://github.com/hyperium/tonic) pentru gRPC." -#: src/async/runtimes.md +#: src/async/runtimes.md:10 #, fuzzy msgid "" "[async-std](https://async.rs/): aims to be a \"std for async\", and includes " @@ -22135,12 +24576,12 @@ msgstr "" "[async-std](https://async.rs/): își propune să fie un \"std pentru async\" " "și include un timp de execuție de bază în `async::task`." -#: src/async/runtimes.md +#: src/async/runtimes.md:12 #, fuzzy msgid "[smol](https://docs.rs/smol/latest/smol/): simple and lightweight" msgstr "[smol](https://docs.rs/smol/latest/smol/): simplu și ușor" -#: src/async/runtimes.md +#: src/async/runtimes.md:14 #, fuzzy msgid "" "Several larger applications have their own runtimes. For example, [Fuchsia]" @@ -22151,7 +24592,7 @@ msgstr "" "exemplu, [Fuchsia](https://fuchsia.googlesource.com/fuchsia/+/refs/heads/" "main/src/lib/fuchsia-async/src/lib.rs) are deja unul." -#: src/async/runtimes.md +#: src/async/runtimes.md:20 #, fuzzy msgid "" "Note that of the listed runtimes, only Tokio is supported in the Rust " @@ -22163,7 +24604,7 @@ msgstr "" "de I/O, astfel încât cele mai multe lucruri asincrone interesante nu pot fi " "rulate în terenul de joacă." -#: src/async/runtimes.md +#: src/async/runtimes.md:24 #, fuzzy msgid "" "Futures are \"inert\" in that they do not do anything (not even start an I/O " @@ -22176,59 +24617,61 @@ msgstr "" "Acest lucru este diferit de JS Promises, de exemplu, care vor fi executate " "până la finalizare chiar dacă nu sunt folosite niciodată." -#: src/async/runtimes/tokio.md +#: src/async/runtimes/tokio.md:3 #, fuzzy msgid "Tokio provides:" msgstr "Tokio oferă:" -#: src/async/runtimes/tokio.md +#: src/async/runtimes/tokio.md:5 #, fuzzy msgid "A multi-threaded runtime for executing asynchronous code." msgstr "" "Un timp de execuție cu mai multe fire de execuție pentru executarea de cod " "asincron." -#: src/async/runtimes/tokio.md +#: src/async/runtimes/tokio.md:6 #, fuzzy msgid "An asynchronous version of the standard library." msgstr "O versiune asincronă a bibliotecii standard." -#: src/async/runtimes/tokio.md +#: src/async/runtimes/tokio.md:7 #, fuzzy msgid "A large ecosystem of libraries." msgstr "Un ecosistem mare de biblioteci." -#: src/async/runtimes/tokio.md +#: src/async/runtimes/tokio.md:14 +#, fuzzy msgid "\"Count in task: {i}!\"" -msgstr "" +msgstr "\"Numărătoarea în sarcină: {i}!\"" -#: src/async/runtimes/tokio.md +#: src/async/runtimes/tokio.md:24 +#, fuzzy msgid "\"Main task: {i}\"" -msgstr "" +msgstr "\"Sarcina principală: {i}\"" -#: src/async/runtimes/tokio.md +#: src/async/runtimes/tokio.md:32 #, fuzzy msgid "With the `tokio::main` macro we can now make `main` async." msgstr "" "Cu ajutorul macroului `tokio::main` putem face acum ca `main` să fie " "asincronizat." -#: src/async/runtimes/tokio.md +#: src/async/runtimes/tokio.md:34 #, fuzzy msgid "The `spawn` function creates a new, concurrent \"task\"." msgstr "Funcția `spawn` creează o nouă \"sarcină\" concurentă." -#: src/async/runtimes/tokio.md +#: src/async/runtimes/tokio.md:36 #, fuzzy msgid "Note: `spawn` takes a `Future`, you don't call `.await` on `count_to`." msgstr "Notă: `spawn` ia un `Future`, nu se apelează `.await` pe `count_to`." -#: src/async/runtimes/tokio.md +#: src/async/runtimes/tokio.md:38 #, fuzzy msgid "**Further exploration:**" msgstr "**Explorare suplimentară:**" -#: src/async/runtimes/tokio.md +#: src/async/runtimes/tokio.md:40 #, fuzzy msgid "" "Why does `count_to` not (usually) get to 10? This is an example of async " @@ -22239,22 +24682,22 @@ msgstr "" "anulare asincronă. `tokio::spawn` returnează un handle care poate fi " "așteptat pentru a aștepta până când se termină." -#: src/async/runtimes/tokio.md +#: src/async/runtimes/tokio.md:44 #, fuzzy msgid "Try `count_to(10).await` instead of spawning." msgstr "Încearcă `count_to(10).await` în loc de spawning." -#: src/async/runtimes/tokio.md +#: src/async/runtimes/tokio.md:46 #, fuzzy msgid "Try awaiting the task returned from `tokio::spawn`." msgstr "Încercați să așteptați sarcina returnată de `tokio::spawn`." -#: src/async/tasks.md +#: src/async/tasks.md:3 #, fuzzy msgid "Rust has a task system, which is a form of lightweight threading." msgstr "Rust are un sistem de sarcini, care este o formă de threading ușor." -#: src/async/tasks.md +#: src/async/tasks.md:5 #, fuzzy msgid "" "A task has a single top-level future which the executor polls to make " @@ -22270,31 +24713,37 @@ msgstr "" "sarcini este posibilă prin interogarea mai multor futures mai mici, cum ar " "fi cursele dintre un cronometru și o operațiune I/O." -#: src/async/tasks.md +#: src/async/tasks.md:16 +#, fuzzy msgid "\"127.0.0.1:0\"" -msgstr "" +msgstr "\"127.0.0.1:0\"" -#: src/async/tasks.md +#: src/async/tasks.md:17 +#, fuzzy msgid "\"listening on port {}\"" -msgstr "" +msgstr "\"ascultând pe portul 2000\"" -#: src/async/tasks.md +#: src/async/tasks.md:22 +#, fuzzy msgid "\"connection from {addr:?}\"" -msgstr "" +msgstr "\"Conexiune nouă de la {addr:?}\"" -#: src/async/tasks.md +#: src/async/tasks.md:25 +#, fuzzy msgid "b\"Who are you?\\n\"" -msgstr "" +msgstr "b \"Cine ești tu?\\n\"" -#: src/async/tasks.md +#: src/async/tasks.md:25 src/async/tasks.md:28 src/async/tasks.md:31 +#, fuzzy msgid "\"socket error\"" -msgstr "" +msgstr "\"eroare de socket\"" -#: src/async/tasks.md +#: src/async/tasks.md:30 +#, fuzzy msgid "\"Thanks for dialing in, {name}!\\n\"" -msgstr "" +msgstr "\"Mulțumesc că ați sunat, {name}!\\n\"" -#: src/async/tasks.md src/async/control-flow/join.md +#: src/async/tasks.md:39 src/async/control-flow/join.md:36 #, fuzzy msgid "" "Copy this example into your prepared `src/main.rs` and run it from there." @@ -22302,7 +24751,7 @@ msgstr "" "Copiați acest exemplu în fișierul pregătit `src/main.rs` și rulați-l de " "acolo." -#: src/async/tasks.md +#: src/async/tasks.md:41 #, fuzzy msgid "" "Try connecting to it with a TCP connection tool like [nc](https://www.unix." @@ -22313,7 +24762,7 @@ msgstr "" "ar fi [nc](https://www.unix.com/man-page/linux/1/nc/) sau [telnet](https://" "www.unix.com/man-page/linux/1/telnet/)." -#: src/async/tasks.md +#: src/async/tasks.md:45 #, fuzzy msgid "" "Ask students to visualize what the state of the example server would be with " @@ -22322,7 +24771,7 @@ msgstr "" "Cereți elevilor să vizualizeze care ar fi starea serverului de exemplu cu " "câțiva clienți conectați. Ce sarcini există? Care este viitorul lor?" -#: src/async/tasks.md +#: src/async/tasks.md:48 #, fuzzy msgid "" "This is the first time we've seen an `async` block. This is similar to a " @@ -22333,7 +24782,7 @@ msgstr "" "cu o închidere, dar nu primește niciun argument. Valoarea sa de întoarcere " "este un Future, similar cu un `async fn`." -#: src/async/tasks.md +#: src/async/tasks.md:52 #, fuzzy msgid "" "Refactor the async block into a function, and improve the error handling " @@ -22342,40 +24791,45 @@ msgstr "" "Refaceți blocul asincron într-o funcție și îmbunătățiți gestionarea erorilor " "folosind `?`." -#: src/async/channels.md +#: src/async/channels.md:3 #, fuzzy msgid "" "Several crates have support for asynchronous channels. For instance `tokio`:" msgstr "" "Mai multe crates au suport pentru canale asincrone. De exemplu, `tokio`:" -#: src/async/channels.md +#: src/async/channels.md:13 +#, fuzzy msgid "\"Received {count} pings so far.\"" -msgstr "" +msgstr "\"A primit {count} ping-uri până acum.\"" -#: src/async/channels.md +#: src/async/channels.md:16 +#, fuzzy msgid "\"ping_handler complete\"" -msgstr "" +msgstr "\"ping_handler complete\"" -#: src/async/channels.md +#: src/async/channels.md:24 +#, fuzzy msgid "\"Failed to send ping.\"" -msgstr "" +msgstr "\"Nu a reușit să trimită ping.\"" -#: src/async/channels.md +#: src/async/channels.md:25 +#, fuzzy msgid "\"Sent {} pings so far.\"" -msgstr "" +msgstr "\"A trimis {} ping-uri până acum.\"" -#: src/async/channels.md +#: src/async/channels.md:29 +#, fuzzy msgid "\"Something went wrong in ping handler task.\"" -msgstr "" +msgstr "\"Ceva a mers prost în sarcina de gestionare a ping-ului.\"" -#: src/async/channels.md +#: src/async/channels.md:35 #, fuzzy msgid "Change the channel size to `3` and see how it affects the execution." msgstr "" "Schimbați dimensiunea canalului la `3` și vedeți cum afectează execuția." -#: src/async/channels.md +#: src/async/channels.md:37 #, fuzzy msgid "" "Overall, the interface is similar to the `sync` channels as seen in the " @@ -22384,12 +24838,12 @@ msgstr "" "În general, interfața este similară cu cea a canalelor `sync`, așa cum se " "vede în [morning class](concurrency/channels.md)." -#: src/async/channels.md +#: src/async/channels.md:40 #, fuzzy msgid "Try removing the `std::mem::drop` call. What happens? Why?" msgstr "Încercați să eliminați apelul `std::mem::drop`. Ce se întâmplă? De ce?" -#: src/async/channels.md +#: src/async/channels.md:42 #, fuzzy msgid "" "The [Flume](https://docs.rs/flume/latest/flume/) crate has channels that " @@ -22401,7 +24855,7 @@ msgstr "" "fi convenabil pentru aplicațiile complexe cu sarcini de procesare atât IO, " "cât și grele pentru CPU." -#: src/async/channels.md +#: src/async/channels.md:46 #, fuzzy msgid "" "What makes working with `async` channels preferable is the ability to " @@ -22412,12 +24866,12 @@ msgstr "" "capacitatea de a le combina cu alte `future` pentru a le combina și a crea " "un flux de control complex." -#: src/async/control-flow.md +#: src/async/control-flow.md:1 #, fuzzy msgid "Futures Control Flow" msgstr "Fluxul de control al contractelor futures" -#: src/async/control-flow.md +#: src/async/control-flow.md:3 #, fuzzy msgid "" "Futures can be combined together to produce concurrent compute flow graphs. " @@ -22428,17 +24882,17 @@ msgstr "" "concurent. Am văzut deja sarcini, care funcționează ca fire de execuție " "independente." -#: src/async/control-flow.md +#: src/async/control-flow.md:6 #, fuzzy msgid "[Join](control-flow/join.md)" msgstr "[Join](control-flow/join.md)" -#: src/async/control-flow.md +#: src/async/control-flow.md:7 #, fuzzy msgid "[Select](control-flow/select.md)" msgstr "[Selectare](control-flow/select.md)" -#: src/async/control-flow/join.md +#: src/async/control-flow/join.md:3 #, fuzzy msgid "" "A join operation waits until all of a set of futures are ready, and returns " @@ -22450,23 +24904,27 @@ msgstr "" "lucru este similar cu `Promise.all` în JavaScript sau `asyncio.gather` în " "Python." -#: src/async/control-flow/join.md +#: src/async/control-flow/join.md:21 +#, fuzzy msgid "\"https://google.com\"" -msgstr "" +msgstr "\"https://google.com\"" -#: src/async/control-flow/join.md +#: src/async/control-flow/join.md:22 +#, fuzzy msgid "\"https://httpbin.org/ip\"" -msgstr "" +msgstr "\"https://httpbin.org/ip\"" -#: src/async/control-flow/join.md +#: src/async/control-flow/join.md:23 +#, fuzzy msgid "\"https://play.rust-lang.org/\"" -msgstr "" +msgstr "\"https://play.rust-lang.org/\"" -#: src/async/control-flow/join.md +#: src/async/control-flow/join.md:24 +#, fuzzy msgid "\"BAD_URL\"" -msgstr "" +msgstr "\"BAD_URL\"" -#: src/async/control-flow/join.md +#: src/async/control-flow/join.md:38 #, fuzzy msgid "" "For multiple futures of disjoint types, you can use `std::future::join!` but " @@ -22478,7 +24936,7 @@ msgstr "" "Acest lucru se află în prezent în crăiasa `futures`, urmând a fi stabilizat " "în curând în `std::future`." -#: src/async/control-flow/join.md +#: src/async/control-flow/join.md:42 #, fuzzy msgid "" "The risk of `join` is that one of the futures may never resolve, this would " @@ -22487,7 +24945,7 @@ msgstr "" "Riscul `join` este ca unul dintre futures să nu se rezolve niciodată, ceea " "ce ar face ca programul dumneavoastră să se blocheze." -#: src/async/control-flow/join.md +#: src/async/control-flow/join.md:45 #, fuzzy msgid "" "You can also combine `join_all` with `join!` for instance to join all " @@ -22502,7 +24960,7 @@ msgstr "" "`futures::join!`. Acesta nu este un timeout (care necesită `select!`, " "explicat în capitolul următor), ci demonstrează `join!`." -#: src/async/control-flow/select.md +#: src/async/control-flow/select.md:3 #, fuzzy msgid "" "A select operation waits until any of a set of futures is ready, and " @@ -22515,7 +24973,7 @@ msgstr "" "JavaScript, această operațiune este similară cu `Promise.race`. În Python, " "se compară cu `asyncio.wait(task_set, return_when=asyncio.FIRST_COMPLETED)`." -#: src/async/control-flow/select.md +#: src/async/control-flow/select.md:8 #, fuzzy msgid "" "Similar to a match statement, the body of `select!` has a number of arms, " @@ -22529,31 +24987,32 @@ msgstr "" "gata, `statement` este executat cu variabilele din `pattern` legate de " "rezultatul `future`." -#: src/async/control-flow/select.md +#: src/async/control-flow/select.md:40 +#, fuzzy msgid "\"Felix\"" -msgstr "" +msgstr "\"Felix\"" -#: src/async/control-flow/select.md +#: src/async/control-flow/select.md:40 +#, fuzzy msgid "\"Failed to send cat.\"" -msgstr "" - -#: src/async/control-flow/select.md -msgid "\"Rex\"" -msgstr "" +msgstr "\"Nu a reușit să trimită pisica.\"" -#: src/async/control-flow/select.md +#: src/async/control-flow/select.md:44 +#, fuzzy msgid "\"Failed to send dog.\"" -msgstr "" +msgstr "\"Nu a reușit să trimită câinele.\"" -#: src/async/control-flow/select.md +#: src/async/control-flow/select.md:49 +#, fuzzy msgid "\"Failed to receive winner\"" -msgstr "" +msgstr "\"Nu a reușit să primească câștigătorul\"" -#: src/async/control-flow/select.md +#: src/async/control-flow/select.md:51 +#, fuzzy msgid "\"Winner is {winner:?}\"" -msgstr "" +msgstr "\"Câștigătorul este {winner:?}\"" -#: src/async/control-flow/select.md +#: src/async/control-flow/select.md:57 #, fuzzy msgid "" "In this example, we have a race between a cat and a dog. " @@ -22566,7 +25025,7 @@ msgstr "" "care ajunge primul. Deoarece câinele are nevoie de 50ms, câștigă împotriva " "pisicii care are nevoie de 500ms." -#: src/async/control-flow/select.md +#: src/async/control-flow/select.md:62 #, fuzzy msgid "" "You can use `oneshot` channels in this example as the channels are supposed " @@ -22575,7 +25034,7 @@ msgstr "" "În acest exemplu, puteți utiliza canale `oneshot`, deoarece canalele trebuie " "să primească doar un singur `send`." -#: src/async/control-flow/select.md +#: src/async/control-flow/select.md:65 #, fuzzy msgid "" "Try adding a deadline to the race, demonstrating selecting different sorts " @@ -22584,7 +25043,7 @@ msgstr "" "Încercați să adăugați un termen limită la cursă, demonstrând că ați selectat " "diferite tipuri de viitoruri." -#: src/async/control-flow/select.md +#: src/async/control-flow/select.md:68 #, fuzzy msgid "" "Note that `select!` drops unmatched branches, which cancels their futures. " @@ -22594,7 +25053,7 @@ msgstr "" "viitorul acestora. Este cel mai ușor de utilizat atunci când fiecare " "execuție a `select!` creează noi futures." -#: src/async/control-flow/select.md +#: src/async/control-flow/select.md:71 #, fuzzy msgid "" "An alternative is to pass `&mut future` instead of the future itself, but " @@ -22604,12 +25063,12 @@ msgstr "" "acest lucru poate duce la probleme, discutate în continuare în slide-ul cu " "privire la fixarea." -#: src/async/pitfalls.md +#: src/async/pitfalls.md:1 #, fuzzy msgid "Pitfalls of async/await" msgstr "Capcanele lui async/await" -#: src/async/pitfalls.md +#: src/async/pitfalls.md:3 #, fuzzy msgid "" "Async / await provides convenient and efficient abstraction for concurrent " @@ -22622,32 +25081,32 @@ msgstr "" "Rust vine și el cu partea sa de capcane și piedici. În acest capitol " "ilustrăm câteva dintre ele:" -#: src/async/pitfalls.md +#: src/async/pitfalls.md:7 #, fuzzy msgid "[Blocking the Executor](pitfalls/blocking-executor.md)" msgstr "[Blocarea executorului](pitfalls/blocking-executor.md)" -#: src/async/pitfalls.md +#: src/async/pitfalls.md:8 #, fuzzy msgid "[Pin](pitfalls/pin.md)" msgstr "[Pin](pitfalls/pin.md)" -#: src/async/pitfalls.md +#: src/async/pitfalls.md:9 #, fuzzy msgid "[Async Traits](pitfalls/async-traits.md)" msgstr "[Trăsături asincrone](pitfalls/async-traits.md)" -#: src/async/pitfalls.md +#: src/async/pitfalls.md:10 #, fuzzy msgid "[Cancellation](pitfalls/cancellation.md)" msgstr "[Anulare](pitfalls/cancellation.md)" -#: src/async/pitfalls/blocking-executor.md +#: src/async/pitfalls/blocking-executor.md:1 #, fuzzy msgid "Blocking the executor" msgstr "Blocarea executorului" -#: src/async/pitfalls/blocking-executor.md +#: src/async/pitfalls/blocking-executor.md:3 #, fuzzy msgid "" "Most async runtimes only allow IO tasks to run concurrently. This means that " @@ -22660,15 +25119,18 @@ msgstr "" "executorul și vor împiedica executarea altor sarcini. O soluție ușoară este " "utilizarea unor metode echivalente asincrone acolo unde este posibil." -#: src/async/pitfalls/blocking-executor.md +#: src/async/pitfalls/blocking-executor.md:14 +#, fuzzy msgid "\"future {id} slept for {duration_ms}ms, finished after {}ms\"" msgstr "" +"\"viitorul {id} a dormit timp de {duration_ms}ms, a terminat după {}ms\"" -#: src/async/pitfalls/blocking-executor.md +#: src/async/pitfalls/blocking-executor.md:19 +#, fuzzy msgid "\"current_thread\"" -msgstr "" +msgstr "\"current_thread\"" -#: src/async/pitfalls/blocking-executor.md +#: src/async/pitfalls/blocking-executor.md:29 #, fuzzy msgid "" "Run the code and see that the sleeps happen consecutively rather than " @@ -22676,7 +25138,7 @@ msgid "" msgstr "" "Rulați codul și vedeți că somnul se produce consecutiv și nu concomitent." -#: src/async/pitfalls/blocking-executor.md +#: src/async/pitfalls/blocking-executor.md:32 #, fuzzy msgid "" "The `\"current_thread\"` flavor puts all tasks on a single thread. This " @@ -22687,14 +25149,14 @@ msgstr "" "lucru face ca efectul să fie mai evident, dar eroarea este încă prezentă în " "varianta cu mai multe fire." -#: src/async/pitfalls/blocking-executor.md +#: src/async/pitfalls/blocking-executor.md:36 #, fuzzy msgid "" "Switch the `std::thread::sleep` to `tokio::time::sleep` and await its result." msgstr "" "Schimbă `std::thread::sleep` cu `tokio::time::sleep` și așteaptă rezultatul." -#: src/async/pitfalls/blocking-executor.md +#: src/async/pitfalls/blocking-executor.md:38 #, fuzzy msgid "" "Another fix would be to `tokio::task::spawn_blocking` which spawns an actual " @@ -22703,7 +25165,7 @@ msgstr "" "O altă soluție ar fi `tokio::task::spawn_blocking` care generează un fir " "real și transformă mânerul său într-un viitor fără a bloca executorul." -#: src/async/pitfalls/blocking-executor.md +#: src/async/pitfalls/blocking-executor.md:41 #, fuzzy msgid "" "You should not think of tasks as OS threads. They do not map 1 to 1 and most " @@ -22722,7 +25184,7 @@ msgstr "" "execuție ale sistemului de operare (de exemplu, CUDA). Preferați `tokio::" "task::spawn_blocking` în astfel de situații." -#: src/async/pitfalls/blocking-executor.md +#: src/async/pitfalls/blocking-executor.md:47 #, fuzzy msgid "" "Use sync mutexes with care. Holding a mutex over an `.await` may cause " @@ -22732,67 +25194,95 @@ msgstr "" "un `.await` poate provoca blocarea unei alte sarcini, iar acea sarcină poate " "fi executată pe același fir." -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:3 +#, fuzzy 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 "" +"Blocurile și funcțiile asincrone returnează tipuri care implementează " +"trăsătura `Future`. Tipul returnat este rezultatul unei transformări a " +"compilatorului care transformă variabilele locale în date stocate în " +"interiorul viitorului." -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:7 +#, fuzzy 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 "" +"Unele dintre aceste variabile pot conține indicatori către alte variabile " +"locale. Din acest motiv, viitorul nu ar trebui să fie mutat niciodată într-o " +"altă locație de memorie, deoarece aceasta ar invalida acești indicatori." -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:11 +#, fuzzy 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 " "operations that would move the instance it points to into a different memory " "location." msgstr "" +"Pentru a preveni deplasarea tipului de viitor în memorie, acesta poate fi " +"interogat numai prin intermediul unui pointer fixat. `Pin` este un înveliș " +"în jurul unei referințe care interzice toate operațiunile care ar putea muta " +"instanța la care indică într-o altă locație de memorie." -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:20 +#, fuzzy 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 "" +"// Un element de lucru. În acest caz, doar dormiți pentru timpul dat și " +"răspundeți\n" +"// cu un mesaj pe canalul `respond_on`.\n" -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:28 +#, fuzzy msgid "// A worker which listens for work on a queue and performs it.\n" -msgstr "" +msgstr "// Un lucrător care ascultă munca într-o coadă și o execută.\n" -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:35 +#, fuzzy msgid "// Pretend to work.\n" -msgstr "" +msgstr "// Prefă-te că lucrezi.\n" -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:38 +#, fuzzy msgid "\"failed to send response\"" -msgstr "" +msgstr "\"nu a reușit să trimită răspunsul\"" -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:41 +#, fuzzy msgid "// TODO: report number of iterations every 100ms\n" -msgstr "" +msgstr "// TODO: raportați numărul de iterații la fiecare 100ms\n" -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:45 +#, fuzzy msgid "// A requester which requests work and waits for it to complete.\n" msgstr "" +"// Un solicitant care solicită lucrări și așteaptă ca acestea să fie " +"finalizate.\n" -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:52 +#, fuzzy msgid "\"failed to send on work queue\"" -msgstr "" +msgstr "\"nu a reușit să trimită în coada de lucru\"" -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:53 +#, fuzzy msgid "\"failed waiting for response\"" -msgstr "" +msgstr "\"eșuat în așteptarea răspunsului\"" -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:62 +#, fuzzy msgid "\"work result for iteration {i}: {resp}\"" -msgstr "" +msgstr "\"rezultatul muncii pentru iterația {i}: {resp}\"" -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:69 #, fuzzy msgid "" "You may recognize this as an example of the actor pattern. Actors typically " @@ -22801,7 +25291,7 @@ msgstr "" "Este posibil să recunoașteți acest lucru ca fiind un exemplu de model actor. " "De obicei, actorii apelează `select!` într-o buclă." -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:72 #, fuzzy msgid "" "This serves as a summation of a few of the previous lessons, so take your " @@ -22810,7 +25300,7 @@ msgstr "" "Aceasta este o rezumare a câtorva dintre lecțiile anterioare, așa că nu vă " "grăbiți cu ea." -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:75 #, fuzzy msgid "" "Naively add a `_ = sleep(Duration::from_millis(100)) => { println!(..) }` to " @@ -22819,7 +25309,7 @@ msgstr "" "Adăugați în mod naiv un `_ = sleep(Duration::from_millis(100)) => { println!" "(..) }` la `select!`. Aceasta nu se va executa niciodată. De ce?" -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:78 #, fuzzy msgid "" "Instead, add a `timeout_fut` containing that future outside of the `loop`:" @@ -22827,7 +25317,7 @@ msgstr "" "În schimb, adăugați un `timeout_fut` care să conțină acel viitor în afara " "`loop`:" -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:89 #, fuzzy msgid "" "This still doesn't work. Follow the compiler errors, adding `&mut` to the " @@ -22838,7 +25328,7 @@ msgstr "" "`&mut` la `timeout_fut` în `select!` pentru a evita deplasarea, apoi " "utilizați `Box::pin`:" -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:103 #, fuzzy msgid "" "This compiles, but once the timeout expires it is `Poll::Ready` on every " @@ -22850,7 +25340,7 @@ msgstr "" "lucru). Actualizați pentru a reseta `timeout_fut` de fiecare dată când " "expiră." -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:107 #, fuzzy msgid "" "Box allocates on the heap. In some cases, `std::pin::pin!` (only recently " @@ -22861,7 +25351,7 @@ msgstr "" "recent, codul mai vechi folosind adesea `tokio::pin!`) este, de asemenea, o " "opțiune, dar este dificil de utilizat pentru un viitor care este realocat." -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:111 #, fuzzy msgid "" "Another alternative is to not use `pin` at all but spawn another task that " @@ -22870,7 +25360,8 @@ msgstr "" "O altă alternativă este să nu folosiți `pin` deloc, ci să generați o altă " "sarcină care va trimite la un canal `oneshot` la fiecare 100ms." -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:114 +#, fuzzy msgid "" "Data that contains pointers to itself is called self-referential. Normally, " "the Rust borrow checker would prevent self-referential data from being " @@ -22878,52 +25369,81 @@ msgid "" "code transformation for async blocks and functions is not verified by the " "borrow checker." msgstr "" +"Datele care conțin indicatoare către ele însele se numesc autoreferențiale. " +"În mod normal, verificatorul de împrumuturi Rust ar împiedica mutarea " +"datelor autoreferențiale, deoarece referințele nu pot supraviețui datelor la " +"care indică. Cu toate acestea, transformarea codului pentru blocurile și " +"funcțiile asincrone nu este verificată de verificatorul de împrumuturi." -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:120 +#, fuzzy 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 "" +"`Pin` este un înveliș în jurul unei referințe. Un obiect nu poate fi mutat " +"de la locul său folosind un pointer fixat. Cu toate acestea, el poate fi " +"mutat printr-un pointer nefixat." -#: src/async/pitfalls/pin.md +#: src/async/pitfalls/pin.md:124 +#, fuzzy 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 "" +"Metoda `poll` a trăsăturii `Future` utilizează `Pin<&mut Self>` în loc de " +"`&mut Self` pentru a se referi la instanță. De aceea, poate fi apelată numai " +"pe un pointer fixat." -#: src/async/pitfalls/async-traits.md -#, fuzzy +#: src/async/pitfalls/async-traits.md:3 +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`." +msgstr "" + +#: src/async/pitfalls/async-traits.md:7 msgid "" -"Async methods in traits are not yet supported in the stable channel ([An " -"experimental feature exists in nightly and should be stabilized in the mid " -"term.](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-trait-" -"nightly.html))" +"However, even with the native support today there are some pitfalls around " +"`async fn` and RPIT in traits:" msgstr "" -"Metodele asincrone din trăsături nu sunt încă acceptate în canalul stabil " -"([O caracteristică experimentală există în nightly și ar trebui să fie " -"stabilizată pe termen mediu.](https://blog.rust-lang.org/inside-" -"rust/2022/11/17/async-fn-in-trait-nightly.html))" -#: src/async/pitfalls/async-traits.md +#: src/async/pitfalls/async-traits.md:10 +msgid "" +"Return-position impl Trait captures all in-scope lifetimes (so some patterns " +"of borrowing cannot be expressed)" +msgstr "" + +#: src/async/pitfalls/async-traits.md:13 +msgid "" +"Traits whose methods use return-position `impl trait` or `async` are not " +"`dyn` compatible." +msgstr "" + +#: src/async/pitfalls/async-traits.md:16 #, fuzzy msgid "" -"The crate [async_trait](https://docs.rs/async-trait/latest/async_trait/) " -"provides a workaround through a macro:" +"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:" msgstr "" "Crate [async_trait](https://docs.rs/async-trait/latest/async_trait/) oferă o " "soluție de rezolvare prin intermediul unei macro:" -#: src/async/pitfalls/async-traits.md +#: src/async/pitfalls/async-traits.md:46 +#, fuzzy msgid "\"running all sleepers..\"" -msgstr "" +msgstr "\"alergând toți cei care dorm...\"" -#: src/async/pitfalls/async-traits.md +#: src/async/pitfalls/async-traits.md:50 +#, fuzzy msgid "\"slept for {}ms\"" -msgstr "" +msgstr "\"adormit pentru {}ms\"" -#: src/async/pitfalls/async-traits.md +#: src/async/pitfalls/async-traits.md:67 #, fuzzy msgid "" "`async_trait` is easy to use, but note that it's using heap allocations to " @@ -22933,7 +25453,7 @@ msgstr "" "pentru a realiza acest lucru. Această alocare în heap are costuri " "suplimentare de performanță." -#: src/async/pitfalls/async-traits.md +#: src/async/pitfalls/async-traits.md:70 #, fuzzy msgid "" "The challenges in language support for `async trait` are deep Rust and " @@ -22948,7 +25468,7 @@ msgstr "" "smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-are-" "hard/) dacă sunteți interesat să aprofundați." -#: src/async/pitfalls/async-traits.md +#: src/async/pitfalls/async-traits.md:76 #, fuzzy msgid "" "Try creating a new sleeper struct that will sleep for a random amount of " @@ -22957,7 +25477,7 @@ msgstr "" "Încercați să creați o nouă structură de somn care va dormi pentru o perioadă " "de timp aleatorie și adăugați-o la Vec." -#: src/async/pitfalls/cancellation.md +#: src/async/pitfalls/cancellation.md:3 #, fuzzy msgid "" "Dropping a future implies it can never be polled again. This is called " @@ -22971,20 +25491,24 @@ msgstr "" "asigura că sistemul funcționează corect chiar și atunci când futures sunt " "anulate. De exemplu, nu trebuie să se blocheze sau să piardă date." -#: src/async/pitfalls/cancellation.md +#: src/async/pitfalls/cancellation.md:35 #, fuzzy msgid "\"not UTF-8\"" -msgstr "UTF-8" +msgstr "" +"Șirurile de caractere Rust sunt codificate UTF-8 și pot conține orice " +"caracter Unicode." -#: src/async/pitfalls/cancellation.md +#: src/async/pitfalls/cancellation.md:51 +#, fuzzy msgid "\"hi\\nthere\\n\"" -msgstr "" +msgstr "\"hi\\nthere\\n\"" -#: src/async/pitfalls/cancellation.md +#: src/async/pitfalls/cancellation.md:57 +#, fuzzy msgid "\"tick!\"" -msgstr "" +msgstr "\"tic!\"" -#: src/async/pitfalls/cancellation.md +#: src/async/pitfalls/cancellation.md:72 #, fuzzy msgid "" "The compiler doesn't help with cancellation-safety. You need to read API " @@ -22994,7 +25518,7 @@ msgstr "" "să citiți documentația API și să vă gândiți la starea pe care o deține " "`async fn`." -#: src/async/pitfalls/cancellation.md +#: src/async/pitfalls/cancellation.md:75 #, fuzzy msgid "" "Unlike `panic` and `?`, cancellation is part of normal control flow (vs " @@ -23003,12 +25527,12 @@ msgstr "" "Spre deosebire de `panic` și `?`, anularea face parte din fluxul normal de " "control (față de gestionarea erorilor)." -#: src/async/pitfalls/cancellation.md +#: src/async/pitfalls/cancellation.md:78 #, fuzzy msgid "The example loses parts of the string." msgstr "Exemplul pierde părți din șir." -#: src/async/pitfalls/cancellation.md +#: src/async/pitfalls/cancellation.md:80 #, fuzzy msgid "" "Whenever the `tick()` branch finishes first, `next()` and its `buf` are " @@ -23017,7 +25541,7 @@ msgstr "" "Ori de câte ori ramura `tick()` se termină prima, se renunță la `next()` și " "la `buf` al acestuia." -#: src/async/pitfalls/cancellation.md +#: src/async/pitfalls/cancellation.md:83 #, fuzzy msgid "" "`LinesReader` can be made cancellation-safe by making `buf` part of the " @@ -23026,11 +25550,12 @@ msgstr "" "`LinesReader` poate fi securizat împotriva anulării prin includerea lui " "`buf` în structură:" -#: src/async/pitfalls/cancellation.md +#: src/async/pitfalls/cancellation.md:97 +#, fuzzy msgid "// prefix buf and bytes with self.\n" -msgstr "" +msgstr "// prefixează buf și bytes cu self.\n" -#: src/async/pitfalls/cancellation.md +#: src/async/pitfalls/cancellation.md:106 #, fuzzy msgid "" "[`Interval::tick`](https://docs.rs/tokio/latest/tokio/time/struct.Interval." @@ -23041,7 +25566,7 @@ msgstr "" "html#method.tick) este sigur în ceea ce privește anularea, deoarece ține " "evidența dacă un tick a fost \"livrat\"." -#: src/async/pitfalls/cancellation.md +#: src/async/pitfalls/cancellation.md:110 #, fuzzy msgid "" "[`AsyncReadExt::read`](https://docs.rs/tokio/latest/tokio/io/trait." @@ -23052,7 +25577,7 @@ msgstr "" "AsyncReadExt.html#method.read) este sigur în ceea ce privește anularea, " "deoarece fie returnează, fie nu citește datele." -#: src/async/pitfalls/cancellation.md +#: src/async/pitfalls/cancellation.md:113 #, fuzzy msgid "" "[`AsyncBufReadExt::read_line`](https://docs.rs/tokio/latest/tokio/io/trait." @@ -23063,7 +25588,7 @@ msgstr "" "AsyncBufReadExt.html#method.read_line) este similar cu exemplul și _nu este_ " "sigur la anulare. Consultați documentația sa pentru detalii și alternative." -#: src/exercises/concurrency/afternoon.md +#: src/exercises/concurrency/afternoon.md:3 #, fuzzy msgid "" "To practice your Async Rust skills, we have again two exercises for you:" @@ -23071,7 +25596,7 @@ msgstr "" "Pentru a vă exersa abilitățile Async Rust, avem din nou două exerciții " "pentru dumneavoastră:" -#: src/exercises/concurrency/afternoon.md +#: src/exercises/concurrency/afternoon.md:5 #, fuzzy msgid "" "Dining philosophers: we already saw this problem in the morning. This time " @@ -23080,7 +25605,7 @@ msgstr "" "Filozofii din sala de mese: am văzut deja această problemă de dimineață. De " "data aceasta o veți implementa cu Async Rust." -#: src/exercises/concurrency/afternoon.md +#: src/exercises/concurrency/afternoon.md:8 #, fuzzy msgid "" "A Broadcast Chat Application: this is a larger project that allows you " @@ -23089,13 +25614,13 @@ msgstr "" "O aplicație de chat cu difuzare: acesta este un proiect mai mare care vă " "permite să experimentați cu caracteristici Async Rust mai avansate." -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/dining-philosophers-async.md:1 +#: src/exercises/concurrency/solutions-afternoon.md:3 #, fuzzy msgid "Dining Philosophers --- Async" msgstr "Filozofii care mănâncă - Async" -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/exercises/concurrency/dining-philosophers-async.md:3 #, fuzzy msgid "" "See [dining philosophers](dining-philosophers.md) for a description of the " @@ -23104,7 +25629,7 @@ msgstr "" "Vezi [dining philosophers](dining-philosophers.md) pentru o descriere a " "problemei." -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/exercises/concurrency/dining-philosophers-async.md:6 #, fuzzy msgid "" "As before, you will need a local [Cargo installation](../../cargo/running-" @@ -23116,12 +25641,18 @@ msgstr "" "fișier numit `src/main.rs`, completați spațiile goale și testați dacă `cargo " "run` nu se blochează:" -#: src/exercises/concurrency/dining-philosophers-async.md -#: src/exercises/concurrency/solutions-afternoon.md -msgid "// Make them think and eat\n" +#: src/exercises/concurrency/dining-philosophers-async.md:37 +#: src/exercises/concurrency/solutions-afternoon.md:31 +msgid "// Keep trying until we have both forks\n" msgstr "" -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/exercises/concurrency/dining-philosophers-async.md:52 +#: src/exercises/concurrency/solutions-afternoon.md:87 +#, fuzzy +msgid "// Make them think and eat\n" +msgstr "// Fă-i să gândească și să mănânce\n" + +#: src/exercises/concurrency/dining-philosophers-async.md:58 #, fuzzy msgid "" "Since this time you are using Async Rust, you'll need a `tokio` dependency. " @@ -23130,7 +25661,7 @@ msgstr "" "Deoarece de data aceasta folosiți Async Rust, veți avea nevoie de o " "dependență `tokio`. Puteți utiliza următorul `Cargo.toml`:" -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/exercises/concurrency/dining-philosophers-async.md:63 #, fuzzy msgid "" "```toml\n" @@ -23155,7 +25686,7 @@ msgstr "" "\"rt-multi-thread\"]}\n" "```" -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/exercises/concurrency/dining-philosophers-async.md:73 #, fuzzy msgid "" "Also note that this time you have to use the `Mutex` and the `mpsc` module " @@ -23164,12 +25695,12 @@ msgstr "" "De asemenea, rețineți că de data aceasta trebuie să folosiți modulele " "`Mutex` și `mpsc` de la `tokio` crate." -#: src/exercises/concurrency/dining-philosophers-async.md +#: src/exercises/concurrency/dining-philosophers-async.md:78 #, fuzzy msgid "Can you make your implementation single-threaded?" msgstr "Poți face ca implementarea ta să fie cu un singur fir de execuție?" -#: src/exercises/concurrency/chat-app.md +#: src/exercises/concurrency/chat-app.md:3 #, fuzzy msgid "" "In this exercise, we want to use our new knowledge to implement a broadcast " @@ -23184,7 +25715,7 @@ msgstr "" "utilizatorilor de la intrarea standard și le trimite la server. Serverul de " "chat difuzează fiecare mesaj pe care îl primește către toți clienții." -#: src/exercises/concurrency/chat-app.md +#: src/exercises/concurrency/chat-app.md:9 #, fuzzy msgid "" "For this, we use [a broadcast channel](https://docs.rs/tokio/latest/tokio/" @@ -23197,17 +25728,17 @@ msgstr "" "(https://docs.rs/tokio-websockets/0.4.0/tokio_websockets/) pentru " "comunicarea dintre client și server." -#: src/exercises/concurrency/chat-app.md +#: src/exercises/concurrency/chat-app.md:12 #, fuzzy msgid "Create a new Cargo project and add the following dependencies:" msgstr "Creați un nou proiect Cargo și adăugați următoarele dependențe:" -#: src/exercises/concurrency/chat-app.md +#: src/exercises/concurrency/chat-app.md:14 #, fuzzy msgid "_Cargo.toml_:" msgstr "_Cargo.toml_:" -#: src/exercises/concurrency/chat-app.md +#: src/exercises/concurrency/chat-app.md:18 #, fuzzy msgid "" "```toml\n" @@ -23218,9 +25749,9 @@ msgid "" "\n" "[dependencies]\n" "futures-util = { version = \"0.3.30\", features = [\"sink\"] }\n" -"http = \"1.0.0\"\n" -"tokio = { version = \"1.28.1\", features = [\"full\"] }\n" -"tokio-websockets = { version = \"0.5.1\", features = [\"client\", " +"http = \"1.1.0\"\n" +"tokio = { version = \"1.37.0\", features = [\"full\"] }\n" +"tokio-websockets = { version = \"0.7.0\", features = [\"client\", " "\"fastrand\", \"server\", \"sha1_smol\"] }\n" "```" msgstr "" @@ -23238,12 +25769,12 @@ msgstr "" "\"fastrand\", \"server\", \"sha1_smol\"] } }\n" "```" -#: src/exercises/concurrency/chat-app.md +#: src/exercises/concurrency/chat-app.md:31 #, fuzzy msgid "The required APIs" msgstr "API-urile necesare" -#: src/exercises/concurrency/chat-app.md +#: src/exercises/concurrency/chat-app.md:33 #, fuzzy msgid "" "You are going to need the following functions from `tokio` and " @@ -23254,7 +25785,7 @@ msgstr "" "(https://docs.rs/tokio-websockets/0.4.0/tokio_websockets/). Petreceți câteva " "minute pentru a vă familiariza cu API-ul." -#: src/exercises/concurrency/chat-app.md +#: src/exercises/concurrency/chat-app.md:37 #, fuzzy msgid "" "[StreamExt::next()](https://docs.rs/futures-util/0.3.28/futures_util/stream/" @@ -23265,7 +25796,7 @@ msgstr "" "trait.StreamExt.html#method.next) implementat de `WebsocketStream`: pentru " "citirea asincronă a mesajelor dintr-un flux Websocket." -#: src/exercises/concurrency/chat-app.md +#: src/exercises/concurrency/chat-app.md:39 #, fuzzy msgid "" "[SinkExt::send()](https://docs.rs/futures-util/0.3.28/futures_util/sink/" @@ -23276,7 +25807,7 @@ msgstr "" "trait.SinkExt.html#method.send) implementat de `WebsocketStream`: pentru " "trimiterea asincronă de mesaje pe un flux Websocket." -#: src/exercises/concurrency/chat-app.md +#: src/exercises/concurrency/chat-app.md:41 #, fuzzy msgid "" "[Lines::next_line()](https://docs.rs/tokio/latest/tokio/io/struct.Lines." @@ -23287,7 +25818,7 @@ msgstr "" "html#method.next_line): pentru citirea asincronă a mesajelor utilizatorului " "de la intrarea standard." -#: src/exercises/concurrency/chat-app.md +#: src/exercises/concurrency/chat-app.md:43 #, fuzzy msgid "" "[Sender::subscribe()](https://docs.rs/tokio/latest/tokio/sync/broadcast/" @@ -23297,12 +25828,12 @@ msgstr "" "struct.Sender.html#method.subscribe): pentru abonarea la un canal de " "difuzare." -#: src/exercises/concurrency/chat-app.md +#: src/exercises/concurrency/chat-app.md:45 #, fuzzy msgid "Two binaries" msgstr "Două binare" -#: src/exercises/concurrency/chat-app.md +#: src/exercises/concurrency/chat-app.md:47 #, fuzzy msgid "" "Normally in a Cargo project, you can have only one binary, and one `src/main." @@ -23322,7 +25853,7 @@ msgstr "" "(a se vedea [documentation](https://doc.rust-lang.org/cargo/reference/cargo-" "targets.html#binaries))." -#: src/exercises/concurrency/chat-app.md +#: src/exercises/concurrency/chat-app.md:54 #, fuzzy msgid "" "Copy the following server and client code into `src/bin/server.rs` and `src/" @@ -23333,69 +25864,64 @@ msgstr "" "`src/bin/client.rs`. Sarcina dumneavoastră este de a completa aceste fișiere " "așa cum este descris mai jos." -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md -#, fuzzy +#: src/exercises/concurrency/chat-app.md:58 +#: src/exercises/concurrency/solutions-afternoon.md:108 msgid "_src/bin/server.rs_:" -msgstr "src/bin/server.rs_:" +msgstr "_src/bin/server.rs_:" -#: src/exercises/concurrency/chat-app.md +#: src/exercises/concurrency/chat-app.md:77 +#: src/exercises/concurrency/chat-app.md:124 msgid "// TODO: For a hint, see the description of the task below.\n" msgstr "" +"// TODO: Pentru un indiciu, consultați descrierea sarcinii de mai jos.\n" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/chat-app.md:85 +#: src/exercises/concurrency/solutions-afternoon.md:158 msgid "\"127.0.0.1:2000\"" -msgstr "" +msgstr "\"127.0.0.1:2000\"" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/chat-app.md:86 +#: src/exercises/concurrency/solutions-afternoon.md:159 msgid "\"listening on port 2000\"" -msgstr "" +msgstr "\"ascultând pe portul 2000\"" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/chat-app.md:90 +#: src/exercises/concurrency/solutions-afternoon.md:163 msgid "\"New connection from {addr:?}\"" -msgstr "" +msgstr "\"Conexiune nouă de la {addr:?}\"" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/chat-app.md:93 +#: src/exercises/concurrency/solutions-afternoon.md:166 msgid "// Wrap the raw TCP stream into a websocket.\n" -msgstr "" +msgstr "// Împachetați fluxul TCP brut într-un websocket.\n" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md -#, fuzzy +#: src/exercises/concurrency/chat-app.md:102 +#: src/exercises/concurrency/solutions-afternoon.md:175 msgid "_src/bin/client.rs_:" -msgstr "src/bin/client.rs_:" +msgstr "_src/bin/client.rs_:" -#: src/exercises/concurrency/chat-app.md -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/chat-app.md:116 +#: src/exercises/concurrency/solutions-afternoon.md:187 msgid "\"ws://127.0.0.1:2000\"" -msgstr "" +msgstr "\"ws://127.0.0.1:2000\"" -#: src/exercises/concurrency/chat-app.md -#, fuzzy +#: src/exercises/concurrency/chat-app.md:129 msgid "Running the binaries" msgstr "Rularea fișierelor binare" -#: src/exercises/concurrency/chat-app.md -#, fuzzy +#: src/exercises/concurrency/chat-app.md:131 msgid "Run the server with:" msgstr "Rulați serverul cu:" -#: src/exercises/concurrency/chat-app.md -#, fuzzy +#: src/exercises/concurrency/chat-app.md:137 msgid "and the client with:" msgstr "și clientul cu:" -#: src/exercises/concurrency/chat-app.md -#, fuzzy +#: src/exercises/concurrency/chat-app.md:145 msgid "Implement the `handle_connection` function in `src/bin/server.rs`." msgstr "Implementați funcția `handle_connection` în `src/bin/server.rs`." -#: src/exercises/concurrency/chat-app.md -#, fuzzy +#: src/exercises/concurrency/chat-app.md:146 msgid "" "Hint: Use `tokio::select!` for concurrently performing two tasks in a " "continuous loop. One task receives messages from the client and broadcasts " @@ -23405,13 +25931,11 @@ msgstr "" "sarcini într-o buclă continuă. O sarcină primește mesaje de la client și le " "difuzează. Cealaltă trimite mesajele primite de server către client." -#: src/exercises/concurrency/chat-app.md -#, fuzzy +#: src/exercises/concurrency/chat-app.md:149 msgid "Complete the main function in `src/bin/client.rs`." msgstr "Completați funcția principală din `src/bin/client.rs`." -#: src/exercises/concurrency/chat-app.md -#, fuzzy +#: src/exercises/concurrency/chat-app.md:150 msgid "" "Hint: As before, use `tokio::select!` in a continuous loop for concurrently " "performing two tasks: (1) reading user messages from standard input and " @@ -23423,8 +25947,7 @@ msgstr "" "utilizatorului de la intrarea standard și trimiterea lor la server și (2) " "primirea mesajelor de la server și afișarea lor pentru utilizator." -#: src/exercises/concurrency/chat-app.md -#, fuzzy +#: src/exercises/concurrency/chat-app.md:154 msgid "" "Optional: Once you are done, change the code to broadcast messages to all " "clients, but the sender of the message." @@ -23432,136 +25955,127 @@ msgstr "" "Opțional: După ce ați terminat, modificați codul pentru a difuza mesajele " "către toți clienții, cu excepția expeditorului mesajului." -#: src/exercises/concurrency/solutions-afternoon.md -#, fuzzy +#: src/exercises/concurrency/solutions-afternoon.md:1 msgid "Concurrency Afternoon Exercise" -msgstr "Exercițiul de după-amiază Concurrency" +msgstr "Exercițiul de după-amiază privind concurența" -#: src/exercises/concurrency/solutions-afternoon.md -#, fuzzy +#: src/exercises/concurrency/solutions-afternoon.md:5 msgid "([back to exercise](dining-philosophers-async.md))" -msgstr "([back to exercise](dining-philosophers-async.md))" +msgstr "([înapoi la exercițiu](dining-philosophers-async.md))" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/solutions-afternoon.md:37 msgid "" -"// Add a delay before picking the second fork to allow the execution\n" -" // to transfer to another task\n" +"// 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 -msgid "// The locks are dropped here\n" -msgstr "" - -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/solutions-afternoon.md:44 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" +"// If we didn't get the right fork, drop the left fork and let\n" +" // other tasks make progress.\n" msgstr "" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/solutions-afternoon.md:56 +#, fuzzy +msgid "// The locks are dropped here\n" +msgstr "// Încuietorile sunt aruncate aici\n" + +#: src/exercises/concurrency/solutions-afternoon.md:84 msgid "// tx is dropped here, so we don't need to explicitly drop it later\n" msgstr "" +"// tx este abandonat aici, așa că nu este nevoie să îl abandonăm explicit " +"mai târziu\n" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/solutions-afternoon.md:99 msgid "\"Here is a thought: {thought}\"" -msgstr "" +msgstr "\"Iată un idee: {thought}\"" -#: src/exercises/concurrency/solutions-afternoon.md -#, fuzzy +#: src/exercises/concurrency/solutions-afternoon.md:106 msgid "([back to exercise](chat-app.md))" -msgstr "([back to exercise](chat-app.md))" +msgstr "([înapoi la exercițiu](chat-app.md))" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/solutions-afternoon.md:126 msgid "\"Welcome to chat! Type a message\"" -msgstr "" +msgstr "\"Bine ați venit pe chat! Scrieți un mesaj\"" -#: src/exercises/concurrency/solutions-afternoon.md -#, fuzzy +#: src/exercises/concurrency/solutions-afternoon.md:130 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 "" -"Sugestie: Ca și înainte, utilizați `tokio::select!` într-o buclă continuă " -"pentru a efectua concomitent două sarcini: (1) citirea mesajelor " -"utilizatorului de la intrarea standard și trimiterea lor la server și (2) " -"primirea mesajelor de la server și afișarea lor pentru utilizator." +"// O buclă continuă care face două activități în același timp: (1) primește\n" +" // mesaje de la ‘ws_stream’ și le transmite, și (2) primește\n" +" // mesajele la apelul ‘bcast_rx’ și le trimite clientului.\n" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/solutions-afternoon.md:139 msgid "\"From client {addr:?} {text:?}\"" -msgstr "" +msgstr "\"De la client {addr:?} {text:?}\"" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/solutions-afternoon.md:194 msgid "// Continuous loop for concurrently sending and receiving messages.\n" -msgstr "" +msgstr "// Bucla continuă pentru trimiterea și primirea simultană de mesaje.\n" -#: src/exercises/concurrency/solutions-afternoon.md +#: src/exercises/concurrency/solutions-afternoon.md:201 msgid "\"From server: {}\"" -msgstr "" +msgstr "\"De la server: {}\"" -#: src/thanks.md -#, fuzzy +#: src/thanks.md:3 msgid "" "_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and " "that it was useful." msgstr "" -"vă mulțumim că ați luat Comprehensive Rust 🦀!_ Sperăm că v-a plăcut și că a " -"fost util." +"vă mulțumim că ați parcurs Comprehensive Rust 🦀!_ Sperăm că v-a plăcut și " +"că a fost util." -#: src/thanks.md -#, fuzzy +#: src/thanks.md:6 msgid "" "We've had a lot of fun putting the course together. The course is not " "perfect, so if you spotted any mistakes or have ideas for improvements, " "please get in [contact with us on GitHub](https://github.com/google/" "comprehensive-rust/discussions). We would love to hear from you." msgstr "" -"Ne-am distrat foarte mult la amenajarea traseului. Cursul nu este perfect, " -"așa că, dacă ați observat greșeli sau aveți idei de îmbunătățire, vă rugăm " -"să intrați în [contactați-ne pe GitHub](https://github.com/google/" -"comprehensive-rust/discussions). Ne-ar face plăcere să avem vești de la voi." +"Cursul nu este perfect, așa că, dacă ați observat greșeli sau aveți idei de " +"îmbunătățire, vă rugăm să ne [contactați pe GitHub](https://github.com/" +"google/comprehensive-rust/discussions)." -#: src/glossary.md -#, fuzzy +#: src/glossary.md:5 msgid "" "The following is a glossary which aims to give a short definition of many " "Rust terms. For translations, this also serves to connect the term back to " "the English original." msgstr "" -"Următorul glosar este un glosar care își propune să ofere o scurtă definiție " -"a numeroși termeni Rust. În cazul traducerilor, acesta servește, de " -"asemenea, pentru a face legătura între termenul respectiv și originalul în " -"limba engleză." +"Următorul glosar își propune să ofere o scurtă definiție a numeroși termeni " +"Rust. În cazul traducerilor, acesta servește, de asemenea, pentru a face " +"legătura între termenul respectiv și originalul în limba engleză." -#: src/glossary.md -#, fuzzy +#: src/glossary.md:31 msgid "" "allocate: \n" "Dynamic memory allocation on [the heap](memory-management/stack-vs-heap.md)." msgstr "" -"să aloce: \n" +"alocare: \n" "Alocarea dinamică a memoriei pe [heap](memory-management/stack-vs-heap.md)." -#: src/glossary.md +#: src/glossary.md:33 msgid "" "argument: \n" "Information that is passed into a function or method." msgstr "" +"argument:\n" +"Informații care sunt transmise într-o funcție sau metodă." -#: src/glossary.md -#, fuzzy +#: src/glossary.md:35 msgid "" "Bare-metal Rust: \n" "Low-level Rust development, often deployed to a system without an operating " "system. See [Bare-metal Rust](bare-metal.md)." msgstr "" -"Rust de metal gol:\n" +"Bare-metal Rust:\n" "Dezvoltare Rust de nivel scăzut, adesea implementată pe un sistem fără " "sistem de operare. A se vedea [Bare-metal Rust](bare-metal.md)." -#: src/glossary.md -#, fuzzy +#: src/glossary.md:38 msgid "" "block: \n" "See [Blocks](control-flow/blocks.md) and _scope_." @@ -23569,310 +26083,402 @@ msgstr "" "bloc:\n" "A se vedea [Blocuri](control-flow/blocks.md) și _scope_." -#: src/glossary.md -#, fuzzy +#: src/glossary.md:40 msgid "" "borrow: \n" "See [Borrowing](ownership/borrowing.md)." msgstr "" -"împrumut:\n" +"împrumut (borrow):\n" "A se vedea [Împrumut](ownership/borrowing.md)." -#: src/glossary.md -#, fuzzy +#: src/glossary.md:42 msgid "" "borrow checker: \n" "The part of the Rust compiler which checks that all borrows are valid." msgstr "" -"verificator de împrumuturi:\n" -"Partea din compilatorul Rust care verifică dacă toate împrumuturile sunt " -"valide." +"verificator de împrumuturi (borrow checker):\n" +"Partea din compilatorul Rust care verifică dacă toate împrumuturile de date " +"sunt valide." -#: src/glossary.md -#, fuzzy +#: src/glossary.md:44 msgid "" "brace: \n" "`{` and `}`. Also called _curly brace_, they delimit _blocks_." msgstr "" -"bretele:\n" -"`{` și `}`. Numite și _curly brace_, ele delimitează _blocuri_." +"paranteze:\n" +"`{` și `}`. Numite și _acolade_, ele delimitează _blocuri_." -#: src/glossary.md +#: src/glossary.md:46 msgid "" "build: \n" "The process of converting source code into executable code or a usable " "program." msgstr "" +"construire: \n" +"Procesul de conversie a codului sursă în cod executabil sau într-un program " +"utilizabil." -#: src/glossary.md +#: src/glossary.md:49 msgid "" "call: \n" "To invoke or execute a function or method." msgstr "" +"apel (call): \n" +"Invocarea sau execuția unei funcții sau metode." -#: src/glossary.md -#, fuzzy +#: src/glossary.md:51 msgid "" "channel: \n" "Used to safely pass messages [between threads](concurrency/channels.md)." msgstr "" -"canal: \n" -"Folosit pentru a transmite în siguranță mesaje [între fire] (concurrency/" -"channels.md)." +"canal (channel): \n" +"Folosit pentru a transmite în siguranță mesaje [între fire de execuție] " +"(concurrency/channels.md)." -#: src/glossary.md -#, fuzzy +#: src/glossary.md:53 msgid "" "Comprehensive Rust 🦀: \n" "The courses here are jointly called Comprehensive Rust 🦀." msgstr "" -"Rugină cuprinzătoare 🦀:\n" -"Cursurile de aici se numesc în comun Comprehensive Rust 🦀." +"Comprehensive Rust 🦀:\n" +"Cursurile de aici se numesc în comun Fundamentele Rust 🦀." -#: src/glossary.md +#: src/glossary.md:55 msgid "" "concurrency: \n" "The execution of multiple tasks or processes at the same time." msgstr "" +"concurența (concurrency):\n" +"Executarea mai multor sarcini sau procese în același timp." -#: src/glossary.md -#, fuzzy +#: src/glossary.md:57 msgid "" "Concurrency in Rust: \n" "See [Concurrency in Rust](concurrency.md)." msgstr "" -"Concurrency în Rust:\n" -"A se vedea [Concurrency in Rust](concurrency.md)." +"Concurența în Rust:\n" +"A se vedea [Concurența în Rust](concurrency.md)." -#: src/glossary.md +#: src/glossary.md:59 msgid "" "constant: \n" "A value that does not change during the execution of a program." msgstr "" +"constantă:\n" +"O valoare care nu se modifică în timpul execuției unui program." -#: src/glossary.md +#: src/glossary.md:61 msgid "" "control flow: \n" "The order in which the individual statements or instructions are executed in " "a program." msgstr "" +"fluxul de control: \n" +"Ordinea în care sunt executate instrucțiunile sau declarațiile individuale " +"într-un program." -#: src/glossary.md +#: src/glossary.md:64 msgid "" "crash: \n" "An unexpected and unhandled failure or termination of a program." msgstr "" +"crash:\n" +"Un eșec neașteptat și netratat sau o terminare a unui program." -#: src/glossary.md +#: src/glossary.md:66 msgid "" "enumeration: \n" "A data type that holds one of several named constants, possibly with an " "associated tuple or struct." msgstr "" +"enumerare (enumeration):\n" +"Un tip de date care conține una dintre mai multe constante numite, eventual " +"cu un tupluplu sau o structură asociată." -#: src/glossary.md +#: src/glossary.md:69 msgid "" "error: \n" "An unexpected condition or result that deviates from the expected behavior." msgstr "" +"eroare (error):\n" +"O condiție sau un rezultat neașteptat care se abate de la comportamentul " +"așteptat." -#: src/glossary.md +#: src/glossary.md:71 msgid "" "error handling: \n" "The process of managing and responding to errors that occur during program " "execution." msgstr "" +"gestionarea erorilor:\n" +"Procesul de gestionare și de răspuns la erorile care apar în timpul " +"execuției programului." -#: src/glossary.md +#: src/glossary.md:74 msgid "" "exercise: \n" "A task or problem designed to practice and test programming skills." msgstr "" +"exercițiu:\n" +"O sarcină sau o problemă concepută pentru a exersa și testa abilitățile de " +"programare." -#: src/glossary.md +#: src/glossary.md:76 msgid "" "function: \n" "A reusable block of code that performs a specific task." msgstr "" +"funcție:\n" +"Un bloc de cod reutilizabil care îndeplinește o sarcină specifică." -#: src/glossary.md +#: src/glossary.md:78 msgid "" "garbage collector: \n" "A mechanism that automatically frees up memory occupied by objects that are " "no longer in use." msgstr "" +"colector de gunoi (garbage collector):\n" +"Un mecanism care eliberează automat memoria ocupată de obiecte care nu mai " +"sunt utilizate." -#: src/glossary.md +#: src/glossary.md:81 msgid "" "generics: \n" "A feature that allows writing code with placeholders for types, enabling " "code reuse with different data types." msgstr "" +"generice (generics): \n" +"O caracteristică care permite scrierea de cod cu caractere de substituție " +"pentru tipuri, permițând reutilizarea codului cu diferite tipuri de date." -#: src/glossary.md +#: src/glossary.md:84 msgid "" "immutable: \n" "Unable to be changed after creation." msgstr "" +"imuabile (immutable):\n" +"Nu poate fi modificat după creare." -#: src/glossary.md +#: src/glossary.md:86 msgid "" "integration test: \n" "A type of test that verifies the interactions between different parts or " "components of a system." msgstr "" +"testul de integrare:\n" +"Un tip de test care verifică interacțiunile dintre diferitele părți sau " +"componente ale unui sistem." -#: src/glossary.md +#: src/glossary.md:89 msgid "" "keyword: \n" "A reserved word in a programming language that has a specific meaning and " "cannot be used as an identifier." msgstr "" +"cuvânt cheie:\n" +"Un cuvânt rezervat într-un limbaj de programare care are o semnificație " +"specifică și care nu poate fi folosit ca identificator." -#: src/glossary.md +#: src/glossary.md:92 msgid "" "library: \n" "A collection of precompiled routines or code that can be used by programs." msgstr "" +"bibliotecă: \n" +"O colecție de rutine precompilate sau cod care poate fi utilizat de programe." -#: src/glossary.md +#: src/glossary.md:94 msgid "" "macro: \n" "Rust macros can be recognized by a `!` in the name. Macros are used when " "normal functions are not enough. A typical example is `format!`, which takes " "a variable number of arguments, which isn't supported by Rust functions." msgstr "" +"macro: \n" +"Macro-urile Rust pot fi recunoscute prin introducerea unui `!` în nume. " +"Macrogramele sunt utilizate atunci când funcțiile normale nu sunt " +"suficiente. Un exemplu tipic este `format!`, care acceptă un număr variabil " +"de argumente, ceea ce nu este acceptat de funcțiile Rust." -#: src/glossary.md +#: src/glossary.md:98 msgid "" "`main` function: \n" "Rust programs start executing with the `main` function." msgstr "" +"funcția `main`:\n" +"Programele Rust încep să fie executate cu funcția `main`." -#: src/glossary.md +#: src/glossary.md:100 msgid "" "match: \n" "A control flow construct in Rust that allows for pattern matching on the " "value of an expression." msgstr "" +"potrivire (match):\n" +"O construcție a fluxului de control din Rust care permite potrivirea de " +"tipare pe valoarea unei expresii." -#: src/glossary.md +#: src/glossary.md:103 msgid "" "memory leak: \n" "A situation where a program fails to release memory that is no longer " "needed, leading to a gradual increase in memory usage." msgstr "" +"scurgere de memorie (memory leak):\n" +"O situație în care un program nu reușește să elibereze memoria care nu mai " +"este necesară, ceea ce duce la o creștere treptată a utilizării memoriei." -#: src/glossary.md +#: src/glossary.md:106 msgid "" "method: \n" "A function associated with an object or a type in Rust." msgstr "" +"metoda:\n" +"O funcție asociată cu un obiect sau un tip în Rust." -#: src/glossary.md +#: src/glossary.md:108 msgid "" "module: \n" "A namespace that contains definitions, such as functions, types, or traits, " "to organize code in Rust." msgstr "" +"modul: \n" +"Un spațiu de nume care conține definiții, cum ar fi funcții, tipuri sau " +"trăsături, pentru a organiza codul în Rust." -#: src/glossary.md +#: src/glossary.md:111 msgid "" "move: \n" "The transfer of ownership of a value from one variable to another in Rust." msgstr "" +"mutare (move):\n" +"Transferul proprietății unei valori de la o variabilă la alta în Rust." -#: src/glossary.md +#: src/glossary.md:113 msgid "" "mutable: \n" "A property in Rust that allows variables to be modified after they have been " "declared." msgstr "" +"mutabil:\n" +"O proprietate din Rust care permite variabilelor să fie modificate după ce " +"au fost declarate." -#: src/glossary.md +#: src/glossary.md:116 msgid "" "ownership: \n" "The concept in Rust that defines which part of the code is responsible for " "managing the memory associated with a value." msgstr "" +"posesia (ownership):\n" +"Conceptul din Rust care definește ce parte a codului este responsabilă " +"pentru gestionarea memoriei asociate cu o valoare." -#: src/glossary.md +#: src/glossary.md:119 msgid "" "panic: \n" "An unrecoverable error condition in Rust that results in the termination of " "the program." msgstr "" +"panică:\n" +"O stare de eroare irecuperabilă în Rust care duce la terminarea programului." -#: src/glossary.md +#: src/glossary.md:122 msgid "" "parameter: \n" "A value that is passed into a function or method when it is called." msgstr "" +"parametru:\n" +"O valoare care este transmisă într-o funcție sau metodă atunci când este " +"apelată." -#: src/glossary.md +#: src/glossary.md:124 msgid "" "pattern: \n" "A combination of values, literals, or structures that can be matched against " "an expression in Rust." msgstr "" +"șablon (pattern):\n" +"O combinație de valori, literali sau structuri care pot fi comparate cu o " +"expresie în Rust." -#: src/glossary.md +#: src/glossary.md:127 msgid "" "payload: \n" "The data or information carried by a message, event, or data structure." msgstr "" +"sarcina utilă: \n" +"Datele sau informațiile transportate de un mesaj, eveniment sau structură de " +"date." -#: src/glossary.md +#: src/glossary.md:129 msgid "" "program: \n" "A set of instructions that a computer can execute to perform a specific task " "or solve a particular problem." msgstr "" +"program: \n" +"Un set de instrucțiuni pe care un computer le poate executa pentru a " +"îndeplini o anumită sarcină sau pentru a rezolva o anumită problemă." -#: src/glossary.md +#: src/glossary.md:132 msgid "" "programming language: \n" "A formal system used to communicate instructions to a computer, such as Rust." msgstr "" +"limbaj de programare: \n" +"Un sistem formal utilizat pentru a comunica instrucțiuni unui calculator, " +"cum ar fi Rust." -#: src/glossary.md +#: src/glossary.md:134 msgid "" "receiver: \n" "The first parameter in a Rust method that represents the instance on which " "the method is called." msgstr "" +"receptor:\n" +"Primul parametru dintr-o metodă Rust care reprezintă instanța asupra căreia " +"este apelată metoda." -#: src/glossary.md +#: src/glossary.md:137 msgid "" "reference counting: \n" "A memory management technique in which the number of references to an object " "is tracked, and the object is deallocated when the count reaches zero." msgstr "" +"numărarea referințelor:\n" +"O tehnică de gestionare a memoriei în care se urmărește numărul de referințe " +"la un obiect, iar obiectul este dezalocat atunci când numărul ajunge la zero." -#: src/glossary.md +#: src/glossary.md:140 msgid "" "return: \n" "A keyword in Rust used to indicate the value to be returned from a function." msgstr "" +"return:\n" +"Un cuvânt cheie din Rust utilizat pentru a indica valoarea care trebuie " +"returnată de o funcție." -#: src/glossary.md +#: src/glossary.md:142 msgid "" "Rust: \n" "A systems programming language that focuses on safety, performance, and " "concurrency." msgstr "" +"Rust:\n" +"Un limbaj de programare de sisteme care se concentrează pe siguranță, " +"performanță și concurență." -#: src/glossary.md +#: src/glossary.md:145 #, fuzzy msgid "" "Rust Fundamentals: \n" -"Days 1 to 3 of this course." +"Days 1 to 4 of this course." msgstr "" -"Noțiuni fundamentale de rugină:\n" +"Noțiuni fundamentale ale Rust:\n" "Zilele 1 - 3 ale acestui curs." -#: src/glossary.md -#, fuzzy +#: src/glossary.md:147 msgid "" "Rust in Android: \n" "See [Rust in Android](android.md)." @@ -23880,8 +26486,7 @@ msgstr "" "Rust în Android:\n" "A se vedea [Rust in Android](android.md)." -#: src/glossary.md -#, fuzzy +#: src/glossary.md:149 msgid "" "Rust in Chromium: \n" "See [Rust in Chromium](chromium.md)." @@ -23889,147 +26494,207 @@ msgstr "" "Rust în Android:\n" "A se vedea [Rust in Android](android.md)." -#: src/glossary.md +#: src/glossary.md:151 msgid "" "safe: \n" "Refers to code that adheres to Rust's ownership and borrowing rules, " "preventing memory-related errors." msgstr "" +"sigur (safe): \n" +"Se referă la codul care respectă regulile de proprietate și împrumut ale " +"Rust, prevenind erorile legate de memorie." -#: src/glossary.md +#: src/glossary.md:154 msgid "" "scope: \n" "The region of a program where a variable is valid and can be used." msgstr "" +"domeniul de aplicare: \n" +"Regiunea unui program în care o variabilă este valabilă și poate fi " +"utilizată." -#: src/glossary.md +#: src/glossary.md:156 msgid "" "standard library: \n" "A collection of modules providing essential functionality in Rust." msgstr "" +"biblioteca standard: \n" +"O colecție de module care oferă funcționalități esențiale în Rust." -#: src/glossary.md +#: src/glossary.md:158 +#, fuzzy msgid "" "static: \n" "A keyword in Rust used to define static variables or items with a `'static` " "lifetime." msgstr "" +"static:\n" +"Un cuvânt cheie din Rust folosit pentru a defini variabile statice sau " +"elemente cu o durată de viață `'static`'." -#: src/glossary.md +#: src/glossary.md:161 +#, fuzzy msgid "" "string: \n" "A data type storing textual data. See [`String` vs `str`](basic-syntax/" "string-slices.html) for more." msgstr "" +"șir:\n" +"Un tip de date care stochează date textuale. Consultați [`String` vs `str`]" +"(basic-syntax/string-slices.html) pentru mai multe informații." -#: src/glossary.md +#: src/glossary.md:164 +#, fuzzy msgid "" "struct: \n" "A composite data type in Rust that groups together variables of different " "types under a single name." msgstr "" +"struct: \n" +"Un tip de date compozit în Rust care grupează variabile de diferite tipuri " +"sub un singur nume." -#: src/glossary.md +#: src/glossary.md:167 msgid "" "test: \n" "A Rust module containing functions that test the correctness of other " "functions." msgstr "" +"test:\n" +"Un modul Rust care conține funcții care testează corectitudinea altor " +"funcții." -#: src/glossary.md +#: src/glossary.md:170 msgid "" "thread: \n" "A separate sequence of execution in a program, allowing concurrent execution." msgstr "" +"fir de execuție:\n" +"O secvență separată de execuție într-un program, permițând executarea " +"simultană." -#: src/glossary.md +#: src/glossary.md:172 msgid "" "thread safety: \n" "The property of a program that ensures correct behavior in a multithreaded " "environment." msgstr "" +"siguranța firelor de execuție:\n" +"Proprietatea unui program care asigură un comportament corect într-un mediu " +"cu mai multe fire de execuție." -#: src/glossary.md +#: src/glossary.md:175 +#, fuzzy msgid "" "trait: \n" "A collection of methods defined for an unknown type, providing a way to " "achieve polymorphism in Rust." msgstr "" +"trăsătură:\n" +"O colecție de metode definite pentru un tip necunoscut, oferind o modalitate " +"de a realiza polimorfismul în Rust." -#: src/glossary.md +#: src/glossary.md:178 msgid "" "trait bound: \n" "An abstraction where you can require types to implement some traits of your " "interest." msgstr "" +"trăsături obligatorii:\n" +"O abstractizare prin care puteți cere tipurilor să implementeze anumite " +"trăsături de interes pentru dumneavoastră." -#: src/glossary.md +#: src/glossary.md:181 msgid "" "tuple: \n" "A composite data type that contains variables of different types. Tuple " "fields have no names, and are accessed by their ordinal numbers." msgstr "" +"tuplu: \n" +"Un tip de date compozit care conține variabile de diferite tipuri. Câmpurile " +"tuplu nu au nume și sunt accesate prin numerele lor ordinale." -#: src/glossary.md +#: src/glossary.md:184 msgid "" "type: \n" "A classification that specifies which operations can be performed on values " "of a particular kind in Rust." msgstr "" +"tip: \n" +"O clasificare care specifică ce operații pot fi efectuate asupra valorilor " +"datelor în Rust." -#: src/glossary.md +#: src/glossary.md:187 msgid "" "type inference: \n" "The ability of the Rust compiler to deduce the type of a variable or " "expression." msgstr "" +"inferența de tip: \n" +"Capacitatea compilatorului Rust de a deduce tipul unei variabile sau " +"expresii." -#: src/glossary.md +#: src/glossary.md:190 msgid "" "undefined behavior: \n" "Actions or conditions in Rust that have no specified result, often leading " "to unpredictable program behavior." msgstr "" +"comportament nedefinit:\n" +"Acțiuni sau condiții din Rust care nu au un rezultat specificat, ceea ce " +"duce adesea la un comportament imprevizibil al programului." -#: src/glossary.md +#: src/glossary.md:193 msgid "" "union: \n" "A data type that can hold values of different types but only one at a time." msgstr "" +"uniune (union):\n" +"Un tip de date care poate conține valori de tipuri diferite, dar numai una " +"la un moment dat." -#: src/glossary.md +#: src/glossary.md:195 msgid "" "unit test: \n" "Rust comes with built-in support for running small unit tests and larger " "integration tests. See [Unit Tests](testing/unit-tests.html)." msgstr "" +"test unitar:\n" +"Rust vine cu un suport încorporat pentru a rula teste unitare mici și teste " +"de integrare mai mari. Consultați [Teste unitare](testing/unit-tests.html)." -#: src/glossary.md +#: src/glossary.md:198 msgid "" "unit type: \n" "Type that holds no data, written as a tuple with no members." msgstr "" +"tipul unitate: \n" +"Tip care nu conține date, scris ca un tuplu fără membri." -#: src/glossary.md +#: src/glossary.md:200 msgid "" "unsafe: \n" "The subset of Rust which allows you to trigger _undefined behavior_. See " "[Unsafe Rust](unsafe.html)." msgstr "" +"nesigur: \n" +"Un subansamblul Rust care vă permite să declanșați _comportamentul " +"nedefinit_. A se vedea [Rust nesigur](unsafe.html)." -#: src/glossary.md +#: src/glossary.md:203 msgid "" "variable: \n" "A memory location storing data. Variables are valid in a _scope_." msgstr "" +"variabilă:\n" +"O locație de memorie care stochează date. Variabilele sunt valabile într-un " +"_scop_." -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:1 msgid "Other Rust Resources" -msgstr "Alte resurse privind rugina" +msgstr "Alte resurse privind Rust" -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:3 msgid "" "The Rust community has created a wealth of high-quality and free resources " "online." @@ -24037,30 +26702,27 @@ msgstr "" "Comunitatea Rust a creat o multitudine de resurse online gratuite și de " "înaltă calitate." -#: src/other-resources.md +#: src/other-resources.md:6 msgid "Official Documentation" msgstr "Documentație oficială" -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:8 msgid "The Rust project hosts many resources. These cover Rust in general:" msgstr "" "Proiectul Rust găzduiește multe resurse. Acestea se referă la Rust în " "general:" -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:10 msgid "" "[The Rust Programming Language](https://doc.rust-lang.org/book/): the " "canonical free book about Rust. Covers the language in detail and includes a " "few projects for people to build." msgstr "" -"[Limbajul de programare Rust](https://doc.rust-lang.org/book/): cartea " +"[The Rust Programming Language](https://doc.rust-lang.org/book/): cartea " "canonică gratuită despre Rust. Acoperă limbajul în detaliu și include câteva " -"proiecte pe care oamenii le pot construi." +"proiecte care pot fi construite." -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:13 msgid "" "[Rust By Example](https://doc.rust-lang.org/rust-by-example/): covers the " "Rust syntax via a series of examples which showcase different constructs. " @@ -24072,8 +26734,7 @@ msgstr "" "construcții. Uneori include mici exerciții în care vi se cere să dezvoltați " "codul din exemple." -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:17 msgid "" "[Rust Standard Library](https://doc.rust-lang.org/std/): full documentation " "of the standard library for Rust." @@ -24081,8 +26742,7 @@ msgstr "" "[Rust Standard Library](https://doc.rust-lang.org/std/): documentația " "completă a bibliotecii standard pentru Rust." -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:19 msgid "" "[The Rust Reference](https://doc.rust-lang.org/reference/): an incomplete " "book which describes the Rust grammar and memory model." @@ -24090,34 +26750,31 @@ msgstr "" "[The Rust Reference](https://doc.rust-lang.org/reference/): o carte " "incompletă care descrie gramatica și modelul de memorie Rust." -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:22 msgid "More specialized guides hosted on the official Rust site:" msgstr "Ghiduri mai specializate găzduite pe site-ul oficial Rust:" -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:24 msgid "" "[The Rustonomicon](https://doc.rust-lang.org/nomicon/): covers unsafe Rust, " "including working with raw pointers and interfacing with other languages " "(FFI)." msgstr "" -"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): acoperă Rustul " -"nesigur, inclusiv lucrul cu pointeri brute și interfața cu alte limbaje " +"[The Rustonomicon](https://doc.rust-lang.org/nomicon/): acoperă Rust " +"nesigur, inclusiv lucrul cu pointeri bruți și interfața cu alte limbaje " "(FFI)." -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:27 msgid "" "[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/): " "covers the new asynchronous programming model which was introduced after the " "Rust Book was written." msgstr "" -"[Programare asincronă în Rust](https://rust-lang.github.io/async-book/): " +"[Asynchronous Programming în Rust](https://rust-lang.github.io/async-book/): " "acoperă noul model de programare asincronă care a fost introdus după ce a " "fost scrisă cartea Rust." -#: src/other-resources.md +#: src/other-resources.md:30 #, fuzzy msgid "" "[The Embedded Rust Book](https://doc.rust-lang.org/stable/embedded-book/): " @@ -24128,18 +26785,15 @@ msgstr "" "introducere în utilizarea Rust pe dispozitive încorporate fără sistem de " "operare." -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:33 msgid "Unofficial Learning Material" msgstr "Material didactic neoficial" -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:35 msgid "A small selection of other guides and tutorial for Rust:" msgstr "O mică selecție de alte ghiduri și tutoriale pentru Rust:" -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:37 msgid "" "[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): covers Rust " "from the perspective of low-level C programmers." @@ -24147,8 +26801,7 @@ msgstr "" "[Learn Rust the Dangerous Way](http://cliffle.com/p/dangerust/): acoperă " "Rust din perspectiva programatorilor C de nivel inferior." -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:39 msgid "" "[Rust for Embedded C Programmers](https://docs.opentitan.org/doc/ug/" "rust_for_c/): covers Rust from the perspective of developers who write " @@ -24158,8 +26811,7 @@ msgstr "" "rust_for_c/): acoperă Rust din perspectiva dezvoltatorilor care scriu " "firmware în C." -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:41 msgid "" "[Rust for professionals](https://overexact.com/rust-for-professionals/): " "covers the syntax of Rust using side-by-side comparisons with other " @@ -24169,8 +26821,7 @@ msgstr "" "acoperă sintaxa Rust folosind comparații cu alte limbaje precum C, C++, " "Java, JavaScript și Python." -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:44 msgid "" "[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exercises to help " "you learn Rust." @@ -24178,8 +26829,7 @@ msgstr "" "[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exerciții pentru " "a vă ajuta să învățați Rust." -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:46 msgid "" "[Ferrous Teaching Material](https://ferrous-systems.github.io/teaching-" "material/index.html): a series of small presentations covering both basic " @@ -24191,8 +26841,7 @@ msgstr "" "bază, cât și cea avansată a limbajului Rust. Sunt abordate și alte subiecte, " "cum ar fi WebAssembly și async/await." -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:50 msgid "" "[Beginner's Series to Rust](https://docs.microsoft.com/en-us/shows/beginners-" "series-to-rust/) and [Take your first steps with Rust](https://docs." @@ -24207,8 +26856,7 @@ msgstr "" "al doilea este un set de 11 module care acoperă sintaxa Rust și " "construcțiile de bază." -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:56 msgid "" "[Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial." "github.io/too-many-lists/): in-depth exploration of Rust's memory management " @@ -24219,8 +26867,7 @@ msgstr "" "gestionare a memoriei din Rust, prin implementarea câtorva tipuri diferite " "de structuri de liste." -#: src/other-resources.md -#, fuzzy +#: src/other-resources.md:61 msgid "" "Please see the [Little Book of Rust Books](https://lborb.github.io/book/) " "for even more Rust books." @@ -24228,35 +26875,31 @@ msgstr "" "Vă rugăm să consultați [Little Book of Rust Books](https://lborb.github.io/" "book/) pentru și mai multe cărți Rust." -#: src/credits.md -#, fuzzy +#: src/credits.md:3 msgid "" "The material here builds on top of the many great sources of Rust " "documentation. See the page on [other resources](other-resources.md) for a " "full list of useful resources." msgstr "" -"Materialul de aici se bazează pe numeroasele surse excelente de documentație " -"Rust. Consultați pagina privind [alte resurse](other-resources.md) pentru o " -"listă completă de resurse utile." +"Materialul de aici se bazează pe numeroasele surse excelente din " +"documentația Rust. Consultați pagina privind [alte resurse](other-resources." +"md) pentru o listă completă de resurse utile." -#: src/credits.md -#, fuzzy +#: src/credits.md:7 msgid "" "The material of Comprehensive Rust is licensed under the terms of the Apache " "2.0 license, please see [`LICENSE`](https://github.com/google/comprehensive-" "rust/blob/main/LICENSE) for details." msgstr "" -"Materialul din Comprehensive Rust este licențiat în conformitate cu termenii " -"licenței Apache 2.0, vă rugăm să consultați [`LICENSE`](https://github.com/" -"google/comprehensive-rust/blob/main/LICENSE) pentru detalii." +"Materialul din `Comprehensive Rust` este licențiat în conformitate cu " +"termenii licenței Apache 2.0, vă rugăm să consultați [`LICENSE`](https://" +"github.com/google/comprehensive-rust/blob/main/LICENSE) pentru detalii." -#: src/credits.md -#, fuzzy +#: src/credits.md:12 msgid "Rust by Example" -msgstr "Rugină prin exemplu" +msgstr "Rust în exemple" -#: src/credits.md -#, fuzzy +#: src/credits.md:14 msgid "" "Some examples and exercises have been copied and adapted from [Rust by " "Example](https://doc.rust-lang.org/rust-by-example/). Please see the " @@ -24268,13 +26911,14 @@ msgstr "" "directorul `third_party/rust-by-example/` pentru detalii, inclusiv termenii " "licenței." -#: src/credits.md +#: src/credits.md:19 #, fuzzy msgid "Rust on Exercism" -msgstr "Rugină pe Exercițiu" +msgstr "" +"[Rust on Exercism](https://exercism.org/tracks/rust): 100+ exerciții pentru " +"a vă ajuta să învățați Rust." -#: src/credits.md -#, fuzzy +#: src/credits.md:21 msgid "" "Some exercises have been copied and adapted from [Rust on Exercism](https://" "exercism.org/tracks/rust). Please see the `third_party/rust-on-exercism/` " @@ -24284,13 +26928,11 @@ msgstr "" "exercism.org/tracks/rust). Vă rugăm să consultați directorul `third_party/" "rust-on-exercism/` pentru detalii, inclusiv termenii licenței." -#: src/credits.md -#, fuzzy +#: src/credits.md:26 msgid "CXX" msgstr "CXX" -#: src/credits.md -#, fuzzy +#: src/credits.md:28 msgid "" "The [Interoperability with C++](android/interoperability/cpp.md) section " "uses an image from [CXX](https://cxx.rs/). Please see the `third_party/cxx/` " @@ -24300,6 +26942,1841 @@ msgstr "" "utilizează o imagine din [CXX](https://cxx.rs/). Vă rugăm să consultați " "directorul `third_party/cxx/` pentru detalii, inclusiv termenii licenței." +#~ msgid "Conditionals" +#~ msgstr "Condiționale" + +#~ msgid "Static and Const" +#~ msgstr "‘Static’ și ‘Const’" + +#~ msgid "Slices and Lifetimes" +#~ msgstr "Partiții și durate de viață" + +#~ msgid "String References" +#~ msgstr "Referințe la șiruri" + +#~ msgid "Day 1 Morning (3 hours, including breaks)" +#~ msgstr "Ziua 1 Dimineața (3 ore, inclusiv pauzele)" + +#~ msgid "Day 2 Afternoon (3 hours, including breaks)" +#~ msgstr "Ziua 2 după-amiază (3 ore, inclusiv pauzele)" + +#~ msgid "" +#~ "[Slices and Lifetimes](../slices-and-lifetimes.md) (1 hour and 10 minutes)" +#~ msgstr "[Felii și vieți](../slices-and-lifetimes.md) (1 oră și 10 minute)" + +#~ msgid "Day 4 Afternoon (2 hours, including breaks)" +#~ msgstr "Ziua 4 După-amiaza (2 ore, inclusiv pauzele)" + +#~ msgid "Including 10 minute breaks, this session should take about 3 hours" +#~ msgstr "" +#~ "Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze " +#~ "aproximativ 3 ore" + +#~ msgid "This segment should take about 20 minutes" +#~ msgstr "Acest segment ar trebui să dureze aproximativ 20 de minute" + +#~ msgid "" +#~ "Rust has two types to represent strings, both of which will be covered in " +#~ "more depth later. Both _always_ store UTF-8 encoded strings." +#~ msgstr "" +#~ "Rust are două tipuri pentru a reprezenta șiruri de caractere, ambele " +#~ "fiind abordate mai în detaliu mai târziu. Ambele stochează _întotdeauna_ " +#~ "șiruri de caractere codificate UTF-8." + +#~ msgid "`String` - a modifiable, owned string." +#~ msgstr "" +#~ "`String` - o memorie tampon care conține un șir de caractere mutabil." + +#~ msgid "`&str` - a read-only string. String literals have this type." +#~ msgstr "" +#~ "`&str` - un șir de caractere numai pentru citire. Șirurile literale au " +#~ "acest tip." + +#~ msgid "\"🪐\"" +#~ msgstr "\"🪐\"" + +#~ msgid "\", \"" +#~ msgstr "\", \"" + +#~ msgid "\"final sentence: {}\"" +#~ msgstr "“Propoziția finală: {}\"" + +#~ msgid "//println!(\"{:?}\", &sentence[12..13]);\n" +#~ msgstr "//println!(\"{:?}\", &sentence[12..13]);\n" + +#~ msgid "" +#~ "This slide introduces strings. Everything here will be covered in more " +#~ "depth later, but this is enough for subsequent slides and exercises to " +#~ "use strings." +#~ msgstr "" +#~ "Acestă pagină introduce șirurile. Tot ceea ce este aici va fi abordat mai " +#~ "în profunzime mai târziu, dar este suficient pentru ca slide-urile și " +#~ "exercițiile ulterioare să folosească șirurile." + +#~ msgid "Invalid UTF-8 in a string is UB, and this not allowed in safe Rust." +#~ msgstr "" +#~ "UTF-8 invalabil într-un șir de caractere este un comportament nedefinit, " +#~ "iar acest lucru nu este permis în Rust sigur." + +#~ msgid "" +#~ "`String` is a user-defined type with a constructor (`::new()`) and " +#~ "methods like `s.push_str(..)`." +#~ msgstr "" +#~ "`String` este un tip definit de utilizator cu un constructor (`::new()`) " +#~ "și metode precum `s.push_str(...)`." + +#~ msgid "" +#~ "The `&` in `&str` indicates that this is a reference. We will cover " +#~ "references later, so for now just think of `&str` as a unit meaning \"a " +#~ "read-only string\"." +#~ msgstr "" +#~ "Simbolul `&` din `&str` indică faptul că este vorba de o referință. Vom " +#~ "aborda referințele mai târziu, așa că, deocamdată, gândiți-vă la `&str` " +#~ "ca la o unitate care înseamnă \"un șir de caractere numai pentru citire\"." + +#~ msgid "" +#~ "The commented-out line is indexing into the string by byte position. " +#~ "`12..13` does not end on a character boundary, so the program panics. " +#~ "Adjust it to a range that does, based on the error message." +#~ msgstr "" +#~ "Rândul comentat este o indexare a șirului de caractere în funcție de " +#~ "poziția octetului. `12..13` nu se termină pe o limită de caracter, așa că " +#~ "programul intră în panică. Ajustați-l la un interval care să se " +#~ "încadreze, pe baza mesajului de eroare." + +#~ msgid "[Conditionals](./control-flow-basics/conditionals.md) (5 minutes)" +#~ msgstr "[Condiționale](./control-flow-basics/conditionals.md) (5 minute)" + +#~ msgid "Much of the Rust syntax will be familiar to you from C, C++ or Java:" +#~ msgstr "Mare parte din sintaxa Rust vă va fi familiară din C, C++ sau Java:" + +#~ msgid "Blocks are delimited by curly braces." +#~ msgstr "Blocurile sunt delimitate prin acolade, ca în C și C++." + +#~ msgid "" +#~ "Line comments are started with `//`, block comments are delimited by `/" +#~ "* ... */`." +#~ msgstr "" +#~ "Comentariile de o linie încep cu `//`, iar blocurile de comentarii sunt " +#~ "delimitate de `/* ... */`." + +#~ msgid "Keywords like `if` and `while` work the same." +#~ msgstr "Cuvinte cheie precum `if` și `while` funcționează la fel." + +#~ msgid "Variable assignment is done with `=`, comparison is done with `==`." +#~ msgstr "" +#~ "Atribuirea variabilelor se face cu `=`, iar compararea se face cu `==`." + +#~ msgid "" +#~ "We will discuss iteration later; for now, just stick to range expressions." +#~ msgstr "" +#~ "Vom discuta despre iterație mai târziu; deocamdată, limitați-vă la " +#~ "expresiile cu intervale." + +#~ msgid "\"{result}\"" +#~ msgstr "“{result}”" + +#~ msgid "\"x: {x}, i: {i}\"" +#~ msgstr "“x: {x}, i: {i}”" + +#~ msgid "" +#~ "In this case we break the outer loop after 3 iterations of the inner loop." +#~ msgstr "" +#~ "În acest caz, întrerupem bucla exterioară după 3 iterații ale buclei " +#~ "interioare." + +#~ msgid "[Pattern Matching](./tuples-and-arrays/match.md) (10 minutes)" +#~ msgstr "[Potrivirea de șabloane](./tuples-and-arrays/match.md) (10 minute)" + +#~ msgid "" +#~ "Tuples and arrays are the first \"compound\" types we have seen. All " +#~ "elements of an array have the same type, while tuples can accommodate " +#~ "different types. Both types have a size fixed at compile time." +#~ msgstr "" +#~ "Tuplurile și vectorii sunt primele tipuri \"compuse\" pe care le-am " +#~ "văzut. Toate elementele unui vector au același tip, în timp ce tuplurile " +#~ "pot avea diferite tipuri. Ambele tipuri au o dimensiune fixată la " +#~ "compilare." + +#~ msgid "`[T; N]`" +#~ msgstr "`[T; N]`" + +#~ msgid "`[20, 30, 40]`, `[0; 3]`" +#~ msgstr "`[20, 30, 40]`, `[0; 3]`" + +#~ msgid "`()`, `(T,)`, `(T1, T2)`, ..." +#~ msgstr "`()`, `(T,)`, `(T1, T2)`, ..." + +#~ msgid "`()`, `('x',)`, `('x', 1.2)`, ..." +#~ msgstr "`()`, `('x',)`, `('x', 1.2)`, ..." + +#~ msgid "Array assignment and access:" +#~ msgstr "Atribuirea și accesul pentru vectori:" + +#~ msgid "Tuple assignment and access:" +#~ msgstr "Atribuirea și accesul pentru tupluri:" + +#~ msgid "Arrays:" +#~ msgstr "Vectori:" + +#~ msgid "Tuples:" +#~ msgstr "Tupluri:" + +#~ msgid "" +#~ "The empty tuple `()` is also known as the \"unit type\". It is both a " +#~ "type, and the only valid value of that type --- that is to say both the " +#~ "type and its value are expressed as `()`. It is used to indicate, for " +#~ "example, that a function or expression has no return value, as we'll see " +#~ "in a future slide." +#~ msgstr "" +#~ "Tuplul gol `()` este cunoscut și sub numele de \"tip unitate\". Este atât " +#~ "un tip, cât și singura valoare validă a acelui tip - adică atât tipul, " +#~ "cât și valoarea sa sunt exprimate sub forma `()`. Este utilizat pentru a " +#~ "indica, de exemplu, că o funcție sau o expresie nu are valoare de " +#~ "returnare, după cum vom vedea într-un slide viitor." + +#~ msgid "" +#~ "You can think of it as `void` that can be familiar to you from other " +#~ "programming languages." +#~ msgstr "" +#~ "Vă puteți gândi la el ca la un `void` care vă este familiar din alte " +#~ "limbaje de programare." + +#, fuzzy +#~ msgid "" +#~ "Destructuring is a way of extracting data from a data structure by " +#~ "writing a pattern that is matched up to the data structure, binding " +#~ "variables to subcomponents of the data structure." +#~ msgstr "" +#~ "Destructurarea este o modalitate de extragere a datelor dintr-o structură " +#~ "de date prin scrierea unui model care se potrivește cu structura de date, " +#~ "legând variabilele la subcomponente ale structurii de date." + +#~ msgid "You can destructure tuples and arrays by matching on their elements:" +#~ msgstr "" +#~ "Puteți destructura tupluri și tablouri prin potrivirea elementelor " +#~ "acestora:" + +#~ msgid "\"on Y axis\"" +#~ msgstr "\"pe axa Y\"" + +#~ msgid "\"on X axis\"" +#~ msgstr "\"pe axa X\"" + +#~ msgid "\"left of Y axis\"" +#~ msgstr "\"la stânga axei Y\"" + +#~ msgid "\"below X axis\"" +#~ msgstr "\"sub axa X\"" + +#~ msgid "\"first quadrant\"" +#~ msgstr "\"primul cadran\"" + +#~ msgid "\"Tell me about {triple:?}\"" +#~ msgstr "\"Spune-mi despre {triple:?}\"" + +#~ msgid "\"First is 0, y = {y}, and z = {z}\"" +#~ msgstr "“Primul este 0, y = {y}, și z = {z}”" + +#~ msgid "\"First is 1 and the rest were ignored\"" +#~ msgstr "“Primul este 1 și restul au fost ignorate”" + +#~ msgid "\"All elements were ignored\"" +#~ msgstr "“Toate elementele au fost ignorate”" + +#~ msgid "Create a new array pattern using `_` to represent an element." +#~ msgstr "Creați un nou model folosind `_` pentru a reprezenta un element." + +#~ msgid "Add more values to the array." +#~ msgstr "Adăugați mai multe valori la matrice." + +#~ msgid "" +#~ "Point out that how `..` will expand to account for different number of " +#~ "elements." +#~ msgstr "" +#~ "Arătați cum `...` se va extinde pentru a lua în considerare un număr " +#~ "diferit de elemente." + +#~ msgid "" +#~ "Show matching against the tail with patterns `[.., b]` and `[a@..,b]`" +#~ msgstr "" +#~ "Afișează potrivirea la sfârșit cu șabloanele `[.., b]` și `[a@..,b]`" + +#, fuzzy +#~ msgid "" +#~ "Static and constant variables are two different ways to create globally-" +#~ "scoped values that cannot be moved or reallocated during the execution of " +#~ "the program." +#~ msgstr "" +#~ "Variabilele statice și variabilele constante sunt două modalități " +#~ "diferite de a crea valori cu acoperire globală care nu pot fi mutate sau " +#~ "realocate în timpul execuției programului. " + +#~ msgid "Properties table:" +#~ msgstr "Tabelul cu proprietăți:" + +#~ msgid "Has an address in memory" +#~ msgstr "Are o adresă în memorie" + +#~ msgid "No (inlined)" +#~ msgstr "Nu (inclus în cod)" + +#~ msgid "Lives for the entire duration of the program" +#~ msgstr "Există pe întreaga durată a programului" + +#~ msgid "Can be mutable" +#~ msgstr "Poate fi mutabil" + +#~ msgid "Yes (unsafe)" +#~ msgstr "Da (nesigur)" + +#~ msgid "Evaluated at compile time" +#~ msgstr "Evaluat la compilare" + +#~ msgid "Yes (initialised at compile time)" +#~ msgstr "Da (inițializat la compilare)" + +#~ msgid "Inlined wherever it is used" +#~ msgstr "Înlocuit în cod oriunde este utilizat" + +#, fuzzy +#~ msgid "/// Return true if self is less than other.\n" +#~ msgstr "/// Se returnează adevărat dacă sine este mai mic decât celălalt.\n" + +#, fuzzy +#~ msgid "\"Shapiro\"" +#~ msgstr "\"Shapiro\"" + +#, fuzzy +#~ msgid "\"Baumann\"" +#~ msgstr "\"Baumann\"" + +#, fuzzy +#~ msgid "\"there\"" +#~ msgstr "\"acolo\"" + +#, fuzzy +#~ msgid "\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\"" +#~ msgstr "\"ptr = {ptr:#x}, len = {len}, capacity = {capacity}\"" + +#, fuzzy +#~ msgid "" +#~ "A `Box` cannot be empty, so the pointer is always valid and non-`null`. " +#~ "This allows the compiler to optimize the memory layout:" +#~ msgstr "" +#~ "Un `Box` nu poate fi gol, astfel încât pointerul este întotdeauna valid " +#~ "și non-`null`. Acest lucru permite compilatorului să optimizeze " +#~ "dispunerea memoriei:" + +#, fuzzy +#~ msgid "" +#~ "```bob\n" +#~ " Stack Heap\n" +#~ ".- - - - - - - - - - - - - - . .- - - - - - - - - - - - - -.\n" +#~ ": : : :\n" +#~ ": list : : :\n" +#~ ": +---------+----+----+ : : +---------+----+----+ :\n" +#~ ": | Element | 1 | o--+----+-----+--->| Element | 2 | // | :\n" +#~ ": +---------+----+----+ : : +---------+----+----+ :\n" +#~ ": : : :\n" +#~ ": : : :\n" +#~ "'- - - - - - - - - - - - - - ' '- - - - - - - - - - - - - -'\n" +#~ "```" +#~ msgstr "" +#~ "```bob\n" +#~ " Stiva Heap\n" +#~ ".- - - - - - - - - - - - -. .- - - - - - - - - - - - - - - - - - - - - - " +#~ "- -.\n" +#~ ": : : :\n" +#~ ": listă : : : :\n" +#~ ": +------+----+----+ : : +------+----+----+ +------+----+----+ :\n" +#~ ": | Cons | 1 | o--+----+-----+--->| Cons | 2 | o--++--->| Nil | // " +#~ "| // // | :\n" +#~ ": +------+----+----+ : : +------+----+----+ +------+----+----+ :\n" +#~ ": : : :\n" +#~ ": : : :\n" +#~ "'- - - - - - - - - - - - -' '- - - - - - - - - - - - - - - - - - - - - - " +#~ "- -'\n" +#~ "```" + +#, fuzzy +#~ msgid "" +#~ "[Slices and Lifetimes](./slices-and-lifetimes.md) (1 hour and 10 minutes)" +#~ msgstr "[Felii și vieți](../slices-and-lifetimes.md) (1 oră și 10 minute)" + +#, fuzzy +#~ msgid "[String References](./slices-and-lifetimes/str.md) (10 minutes)" +#~ msgstr "" +#~ "[Referințe la șiruri de caractere](./slices-and-lifetimes/str.md) (10 " +#~ "minute)" + +#, fuzzy +#~ msgid "" +#~ "We can now understand the two string types in Rust: `&str` is almost like " +#~ "`&[char]`, but with its data stored in a variable-length encoding (UTF-8)." +#~ msgstr "" +#~ "Acum putem înțelege cele două tipuri de șiruri de caractere în Rust: " +#~ "`&str` este aproape ca `&[char]`, dar cu datele sale stocate într-o " +#~ "codificare de lungime variabilă (UTF-8)." + +#~ msgid "Rust terminology:" +#~ msgstr "Terminologia Rust:" + +#~ msgid "`&str` an immutable reference to a string slice." +#~ msgstr "" +#~ "`&str` o referință imuabilă la o porțiune dintr-un șir de caractere." + +#~ msgid "`String` a mutable string buffer." +#~ msgstr "" +#~ "`String` un memorie tampon care conține un șir de caractere mutabil." + +#, fuzzy +#~ msgid "[Useful Crates](./testing/useful-crates.md) (3 minutes)" +#~ msgstr "[Lăzi utile](./testing/useful-crates.md) (3 minute)" + +#, fuzzy +#~ msgid "[GoogleTest](./testing/googletest.md) (5 minutes)" +#~ msgstr "[GoogleTest](./testing/googletest.md) (5 minute)" + +#, fuzzy +#~ msgid "[Mocking](./testing/mocking.md) (5 minutes)" +#~ msgstr "[Mocking](./testing/mocking.md) (5 minute)" + +#, fuzzy +#~ msgid "Rust comes with only basic support for writing tests." +#~ msgstr "Rust vine doar cu un suport de bază pentru scrierea de teste." + +#, fuzzy +#~ msgid "" +#~ "Here are some additional crates which we recommend for writing tests:" +#~ msgstr "" +#~ "Iată câteva crates suplimentare pe care le recomandăm pentru scrierea de " +#~ "teste:" + +#, fuzzy +#~ msgid "" +#~ "[googletest](https://docs.rs/googletest): Comprehensive test assertion " +#~ "library in the tradition of GoogleTest for C++." +#~ msgstr "" +#~ "[googletest](https://docs.rs/googletest): Bibliotecă cuprinzătoare de " +#~ "testare a afirmațiilor de testare în tradiția GoogleTest pentru C++." + +#, fuzzy +#~ msgid "" +#~ "[proptest](https://docs.rs/proptest): Property-based testing for Rust." +#~ msgstr "" +#~ "[proptest](https://docs.rs/proptest): Testarea bazată pe proprietăți " +#~ "pentru Rust." + +#, fuzzy +#~ msgid "" +#~ "[rstest](https://docs.rs/rstest): Support for fixtures and parameterised " +#~ "tests." +#~ msgstr "" +#~ "[rstest](https://docs.rs/rstest): Suport pentru testele de tip fixtures " +#~ "și teste parametrizate." + +#, fuzzy +#~ msgid "GoogleTest is available for use in AOSP." +#~ msgstr "GoogleTest este disponibil pentru utilizare în AOSP." + +#, fuzzy +#~ msgid "Including 10 minute breaks, this session should take about 2 hours" +#~ msgstr "" +#~ "Incluzând pauzele de 10 minute, această sesiune ar trebui să dureze " +#~ "aproximativ 2 ore" + +#, fuzzy +#~ msgid "" +#~ "Add `vendor_available: true` if your AIDL file is used by a binary in the " +#~ "vendor partition." +#~ msgstr "" +#~ "Adăugați `vendor_available: true` dacă fișierul dvs. AIDL este utilizat " +#~ "de un fișier binar din partiția furnizorului." + +#, fuzzy +#~ msgid "/// Connect to the BirthdayService.\n" +#~ msgstr "/// Conectează-te la BirthdayService.\n" + +#, fuzzy +#~ msgid "" +#~ "// Set up the I2C controller and Inertial Measurement Unit.\n" +#~ " // TODO\n" +#~ msgstr "" +#~ "// Configurați controlerul I2C și unitatea de măsurare inerțială.\n" +#~ " // TODO\n" + +#, fuzzy +#~ msgid "" +#~ "// Read compass data and log it to the serial port.\n" +#~ " // TODO\n" +#~ msgstr "" +#~ "// Citiți datele busolei și înregistrați-le pe portul serial.\n" +#~ " // TODO\n" + +#, fuzzy +#~ msgid "// TODO: Create instance of RTC driver and print current time.\n" +#~ msgstr "" +#~ "// TODO: Creați o instanță a driverului RTC și imprimați ora curentă.\n" + +#, fuzzy +#~ msgid "// TODO: Wait for 3 seconds.\n" +#~ msgstr "// TODO: Așteptați 3 secunde.\n" + +#, fuzzy +#~ msgid "" +#~ "// Copyright 2023 Google LLC\n" +#~ "//\n" +#~ "// Licensed under the Apache License, Version 2.0 (the \"License\");\n" +#~ "// you may not use this file except in compliance with the License.\n" +#~ "// You may obtain a copy of the License at\n" +#~ "//\n" +#~ "// http://www.apache.org/licenses/LICENSE-2.0\n" +#~ "//\n" +#~ "// Unless required by applicable law or agreed to in writing, software\n" +#~ "// distributed under the License is distributed on an \"AS IS\" BASIS,\n" +#~ "// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or " +#~ "implied.\n" +#~ "// See the License for the specific language governing permissions and\n" +#~ "// limitations under the License.\n" +#~ msgstr "" +#~ "```rust,compile_fail\n" +#~ "// Copyright 2023 Google LLC\n" +#~ "//\n" +#~ "// Licențiat sub Licența Apache, versiunea 2.0 (denumită în continuare " +#~ "\"Licența\");\n" +#~ "// nu aveți voie să utilizați acest fișier decât în conformitate cu " +#~ "Licența.\n" +#~ "// Puteți obține o copie a Licenței la adresa\n" +#~ "//\n" +#~ "// http://www.apache.org/licenses/LICENSE-2.0\n" +#~ "//\n" +#~ "// Cu excepția cazului în care legea aplicabilă o impune sau se convine " +#~ "în scris, software-ul\n" +#~ "// distribuit în temeiul licenței este distribuit pe o BAZĂ \"AS IS\",\n" +#~ "// FĂRĂ GARANȚII SAU CONDIȚII DE NICI UN FEL, fie ele exprese sau " +#~ "implicite.\n" +#~ "// Consultați Licența pentru limbajul specific care reglementează " +#~ "permisiunile și\n" +#~ "// limitări în cadrul Licenței.\n" +#~ "\n" +#~ "utilizați cc::Build;\n" +#~ "use std::env;\n" +#~ "\n" +#~ "fn main() {\n" +#~ " #[cfg(target_os = \"linux\")]]\n" +#~ " env::set_var(\"CROSS_COMPILE\", \"aarch64-linux-gnu\");\n" +#~ " #[cfg(not(target_os = \"linux\"))]]\n" +#~ " env::set_var(\"CROSS_COMPILE\", \"aarch64-none-elf\");\n" +#~ "\n" +#~ " Build::new()\n" +#~ " .file(\"entry.S\")\n" +#~ " .file(\"exceptions.S\")\n" +#~ " .file(\"idmap.S\")\n" +#~ " .compile(\"empty\")\n" +#~ "}\n" +#~ "```" + +#, fuzzy +#~ msgid "\"sync_exception_current\"" +#~ msgstr "\"sync_exception_current\"" + +#, fuzzy +#~ msgid "\"irq_current\"" +#~ msgstr "\"irq_current\"" + +#, fuzzy +#~ msgid "\"No pending interrupt\"" +#~ msgstr "\"Nici o întrerupere în așteptare\"" + +#, fuzzy +#~ msgid "\"IRQ {intid:?}\"" +#~ msgstr "\"IRQ {intid:?}\"" + +#, fuzzy +#~ msgid "\"fiq_current\"" +#~ msgstr "\"fiq_current\"" + +#, fuzzy +#~ msgid "\"serr_current\"" +#~ msgstr "\"serr_current\"" + +#, fuzzy +#~ msgid "\"sync_lower\"" +#~ msgstr "\"sync_lower\"" + +#, fuzzy +#~ msgid "\"irq_lower\"" +#~ msgstr "\"irq_lower\"" + +#, fuzzy +#~ msgid "\"fiq_lower\"" +#~ msgstr "\"fiq_lower\"" + +#, fuzzy +#~ msgid "\"serr_lower\"" +#~ msgstr "\"serr_lower\"" + +#, fuzzy +#~ msgid "// ANCHOR: main\n" +#~ msgstr "// ANCHETĂ: principal\n" + +#, fuzzy +#~ msgid "// ANCHOR: Flags\n" +#~ msgstr "// ANCHETĂ: Steaguri\n" + +#, fuzzy +#~ msgid "// ANCHOR_END: Flags\n" +#~ msgstr "// ANCHOR_END: Steaguri\n" + +#, fuzzy +#~ msgid "" +#~ "/// Flags from the UART Receive Status Register / Error Clear Register.\n" +#~ msgstr "" +#~ "/// Semnalizatoare din registrul de stare de recepție UART / registrul de " +#~ "ștergere a erorilor.\n" + +#, fuzzy +#~ msgid "/// Framing error.\n" +#~ msgstr "/// Eroare de încadrare.\n" + +#, fuzzy +#~ msgid "/// Parity error.\n" +#~ msgstr "/// Eroare de paritate.\n" + +#, fuzzy +#~ msgid "/// Break error.\n" +#~ msgstr "/// Eroare de întrerupere.\n" + +#, fuzzy +#~ msgid "/// Overrun error.\n" +#~ msgstr "/// Eroare de depășire.\n" + +#, fuzzy +#~ msgid "// ANCHOR: Registers\n" +#~ msgstr "// ANCHETĂ: Registre\n" + +#, fuzzy +#~ msgid "// ANCHOR_END: Registers\n" +#~ msgstr "// ANCHOR_END: Registre\n" + +#, fuzzy +#~ msgid "" +#~ "// ANCHOR: Uart\n" +#~ "/// Driver for a PL011 UART.\n" +#~ msgstr "" +#~ "// ANCHETĂ: Uart\n" +#~ "/// Driver pentru un UART PL011.\n" + +#, fuzzy +#~ msgid "" +#~ "/// Constructs a new instance of the UART driver for a PL011 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" +#~ " /// PL011 device, which must be mapped into the address space of the " +#~ "process\n" +#~ " /// as device memory and not have any other aliases.\n" +#~ msgstr "" +#~ "/// Construiește o nouă instanță a driverului UART pentru un dispozitiv " +#~ "PL011 la nivelul\n" +#~ " /// adresa de bază dată.\n" +#~ " ///\n" +#~ " /// # Siguranță\n" +#~ " ///\n" +#~ " /// Adresa de bază dată trebuie să indice registrele de control MMIO " +#~ "ale unui dispozitiv de tip\n" +#~ " /// PL011, care trebuie să fie mapate în spațiul de adrese al " +#~ "procesului\n" +#~ " /// ca memorie a dispozitivului și să nu aibă alte alias-uri.\n" + +#, fuzzy +#~ msgid "// ANCHOR_END: Uart\n" +#~ msgstr "// ANCHOR_END: Uart\n" + +#, fuzzy +#~ msgid "\"linux\"" +#~ msgstr "\"linux\"" + +#, fuzzy +#~ msgid "\"CROSS_COMPILE\"" +#~ msgstr "\"CROSS_COMPILE\"" + +#, fuzzy +#~ msgid "\"aarch64-linux-gnu\"" +#~ msgstr "aarch64-paging" + +#, fuzzy +#~ msgid "\"aarch64-none-elf\"" +#~ msgstr "\"aarch64-none-elf\"" + +#, fuzzy +#~ msgid "\"entry.S\"" +#~ msgstr "\"intrare.S\"" + +#, fuzzy +#~ msgid "\"exceptions.S\"" +#~ msgstr "Excepții" + +#, fuzzy +#~ msgid "\"idmap.S\"" +#~ msgstr "\"idmap.S\"" + +#, fuzzy +#~ msgid "\"empty\"" +#~ msgstr "\"gol\"" + +#, fuzzy +#~ msgid "" +#~ "```armasm\n" +#~ "/*\n" +#~ " * Copyright 2023 Google LLC\n" +#~ " *\n" +#~ " * Licensed under the Apache License, Version 2.0 (the \"License\");\n" +#~ " * you may not use this file except in compliance with the License.\n" +#~ " * You may obtain a copy of the License at\n" +#~ " *\n" +#~ " * https://www.apache.org/licenses/LICENSE-2.0\n" +#~ " *\n" +#~ " * Unless required by applicable law or agreed to in writing, software\n" +#~ " * distributed under the License is distributed on an \"AS IS\" BASIS,\n" +#~ " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or " +#~ "implied.\n" +#~ " * See the License for the specific language governing permissions and\n" +#~ " * limitations under the License.\n" +#~ " */\n" +#~ "\n" +#~ ".macro adr_l, reg:req, sym:req\n" +#~ "\tadrp \\reg, \\sym\n" +#~ "\tadd \\reg, \\reg, :lo12:\\sym\n" +#~ ".endm\n" +#~ "\n" +#~ ".macro mov_i, reg:req, imm:req\n" +#~ "\tmovz \\reg, :abs_g3:\\imm\n" +#~ "\tmovk \\reg, :abs_g2_nc:\\imm\n" +#~ "\tmovk \\reg, :abs_g1_nc:\\imm\n" +#~ "\tmovk \\reg, :abs_g0_nc:\\imm\n" +#~ ".endm\n" +#~ "\n" +#~ ".set .L_MAIR_DEV_nGnRE,\t0x04\n" +#~ ".set .L_MAIR_MEM_WBWA,\t0xff\n" +#~ ".set .Lmairval, .L_MAIR_DEV_nGnRE | (.L_MAIR_MEM_WBWA << 8)\n" +#~ "\n" +#~ "/* 4 KiB granule size for TTBR0_EL1. */\n" +#~ ".set .L_TCR_TG0_4KB, 0x0 << 14\n" +#~ "/* 4 KiB granule size for TTBR1_EL1. */\n" +#~ ".set .L_TCR_TG1_4KB, 0x2 << 30\n" +#~ "/* Disable translation table walk for TTBR1_EL1, generating a translation " +#~ "fault instead. */\n" +#~ ".set .L_TCR_EPD1, 0x1 << 23\n" +#~ "/* Translation table walks for TTBR0_EL1 are inner sharable. */\n" +#~ ".set .L_TCR_SH_INNER, 0x3 << 12\n" +#~ "/*\n" +#~ " * Translation table walks for TTBR0_EL1 are outer write-back read-" +#~ "allocate write-allocate\n" +#~ " * cacheable.\n" +#~ " */\n" +#~ ".set .L_TCR_RGN_OWB, 0x1 << 10\n" +#~ "/*\n" +#~ " * Translation table walks for TTBR0_EL1 are inner write-back read-" +#~ "allocate write-allocate\n" +#~ " * cacheable.\n" +#~ " */\n" +#~ ".set .L_TCR_RGN_IWB, 0x1 << 8\n" +#~ "/* Size offset for TTBR0_EL1 is 2**39 bytes (512 GiB). */\n" +#~ ".set .L_TCR_T0SZ_512, 64 - 39\n" +#~ ".set .Ltcrval, .L_TCR_TG0_4KB | .L_TCR_TG1_4KB | .L_TCR_EPD1 | ." +#~ "L_TCR_RGN_OWB\n" +#~ ".set .Ltcrval, .Ltcrval | .L_TCR_RGN_IWB | .L_TCR_SH_INNER | ." +#~ "L_TCR_T0SZ_512\n" +#~ "\n" +#~ "/* Stage 1 instruction access cacheability is unaffected. */\n" +#~ ".set .L_SCTLR_ELx_I, 0x1 << 12\n" +#~ "/* SP alignment fault if SP is not aligned to a 16 byte boundary. */\n" +#~ ".set .L_SCTLR_ELx_SA, 0x1 << 3\n" +#~ "/* Stage 1 data access cacheability is unaffected. */\n" +#~ ".set .L_SCTLR_ELx_C, 0x1 << 2\n" +#~ "/* EL0 and EL1 stage 1 MMU enabled. */\n" +#~ ".set .L_SCTLR_ELx_M, 0x1 << 0\n" +#~ "/* Privileged Access Never is unchanged on taking an exception to EL1. " +#~ "*/\n" +#~ ".set .L_SCTLR_EL1_SPAN, 0x1 << 23\n" +#~ "/* SETEND instruction disabled at EL0 in aarch32 mode. */\n" +#~ ".set .L_SCTLR_EL1_SED, 0x1 << 8\n" +#~ "/* Various IT instructions are disabled at EL0 in aarch32 mode. */\n" +#~ ".set .L_SCTLR_EL1_ITD, 0x1 << 7\n" +#~ ".set .L_SCTLR_EL1_RES1, (0x1 << 11) | (0x1 << 20) | (0x1 << 22) | (0x1 << " +#~ "28) | (0x1 << 29)\n" +#~ ".set .Lsctlrval, .L_SCTLR_ELx_M | .L_SCTLR_ELx_C | .L_SCTLR_ELx_SA | ." +#~ "L_SCTLR_EL1_ITD | .L_SCTLR_EL1_SED\n" +#~ ".set .Lsctlrval, .Lsctlrval | .L_SCTLR_ELx_I | .L_SCTLR_EL1_SPAN | ." +#~ "L_SCTLR_EL1_RES1\n" +#~ "\n" +#~ "/**\n" +#~ " * This is a generic entry point for an image. It carries out the " +#~ "operations required to prepare the\n" +#~ " * loaded image to be run. Specifically, it zeroes the bss section using " +#~ "registers x25 and above,\n" +#~ " * prepares the stack, enables floating point, and sets up the exception " +#~ "vector. It preserves x0-x3\n" +#~ " * for the Rust entry point, as these may contain boot parameters.\n" +#~ " */\n" +#~ ".section .init.entry, \"ax\"\n" +#~ ".global entry\n" +#~ "entry:\n" +#~ "\t/* Load and apply the memory management configuration, ready to enable " +#~ "MMU and caches. */\n" +#~ "\tadrp x30, idmap\n" +#~ "\tmsr ttbr0_el1, x30\n" +#~ "\n" +#~ "\tmov_i x30, .Lmairval\n" +#~ "\tmsr mair_el1, x30\n" +#~ "\n" +#~ "\tmov_i x30, .Ltcrval\n" +#~ "\t/* Copy the supported PA range into TCR_EL1.IPS. */\n" +#~ "\tmrs x29, id_aa64mmfr0_el1\n" +#~ "\tbfi x30, x29, #32, #4\n" +#~ "\n" +#~ "\tmsr tcr_el1, x30\n" +#~ "\n" +#~ "\tmov_i x30, .Lsctlrval\n" +#~ "\n" +#~ "\t/*\n" +#~ "\t * Ensure everything before this point has completed, then invalidate " +#~ "any potentially stale\n" +#~ "\t * local TLB entries before they start being used.\n" +#~ "\t */\n" +#~ "\tisb\n" +#~ "\ttlbi vmalle1\n" +#~ "\tic iallu\n" +#~ "\tdsb nsh\n" +#~ "\tisb\n" +#~ "\n" +#~ "\t/*\n" +#~ "\t * Configure sctlr_el1 to enable MMU and cache and don't proceed until " +#~ "this has completed.\n" +#~ "\t */\n" +#~ "\tmsr sctlr_el1, x30\n" +#~ "\tisb\n" +#~ "\n" +#~ "\t/* Disable trapping floating point access in EL1. */\n" +#~ "\tmrs x30, cpacr_el1\n" +#~ "\torr x30, x30, #(0x3 << 20)\n" +#~ "\tmsr cpacr_el1, x30\n" +#~ "\tisb\n" +#~ "\n" +#~ "\t/* Zero out the bss section. */\n" +#~ "\tadr_l x29, bss_begin\n" +#~ "\tadr_l x30, bss_end\n" +#~ "0:\tcmp x29, x30\n" +#~ "\tb.hs 1f\n" +#~ "\tstp xzr, xzr, [x29], #16\n" +#~ "\tb 0b\n" +#~ "\n" +#~ "1:\t/* Prepare the stack. */\n" +#~ "\tadr_l x30, boot_stack_end\n" +#~ "\tmov sp, x30\n" +#~ "\n" +#~ "\t/* Set up exception vector. */\n" +#~ "\tadr x30, vector_table_el1\n" +#~ "\tmsr vbar_el1, x30\n" +#~ "\n" +#~ "\t/* Call into Rust code. */\n" +#~ "\tbl main\n" +#~ "\n" +#~ "\t/* Loop forever waiting for interrupts. */\n" +#~ "2:\twfi\n" +#~ "\tb 2b\n" +#~ "```" +#~ msgstr "" +#~ "```armasm\n" +#~ "/*\n" +#~ " * Drepturi de autor 2023 Google LLC\n" +#~ " *\n" +#~ " * Licențiat sub licența Apache License, versiunea 2.0 (\"Licența\");\n" +#~ " * nu aveți voie să utilizați acest fișier decât în conformitate cu " +#~ "Licența.\n" +#~ " * Puteți obține o copie a Licenței la adresa\n" +#~ " *\n" +#~ " * https://www.apache.org/licenses/LICENSE-2.0\n" +#~ " *\n" +#~ " * Cu excepția cazului în care legislația aplicabilă o impune sau se " +#~ "convine în scris, software-ul\n" +#~ " * distribuit în temeiul licenței este distribuit pe o BAZĂ \"AS IS\",\n" +#~ " * FĂRĂ GARANȚII SAU CONDIȚII DE NICI UN FEL, fie ele exprese sau " +#~ "implicite.\n" +#~ " * Consultați Licența pentru limbajul specific care reglementează " +#~ "permisiunile și\n" +#~ " * limitări în cadrul Licenței.\n" +#~ " */\n" +#~ "\n" +#~ ".macro adr_l, reg:req, sym:req\n" +#~ "\tadrp \\reg, \\sym\n" +#~ "\tadd \\reg, \\reg, :lo12:\\sym\n" +#~ ".endm\n" +#~ "\n" +#~ ".macro mov_i, reg:req, imm:req\n" +#~ "\tmovz \\reg, :abs_g3:\\imm\n" +#~ "\tmovk \\reg, :abs_g2_nc:\\imm\n" +#~ "\tmovk \\reg, :abs_g1_nc:\\imm\n" +#~ "\tmovk \\reg, :abs_g0_nc:\\imm\n" +#~ ".endm\n" +#~ "\n" +#~ ".set .L_MAIR_DEV_nGnRE, 0x04\n" +#~ ".set .L_MAIR_MEM_WBWA, 0xff\n" +#~ ".set .Lmairval, .L_MAIR_DEV_nGnRE | (.L_MAIR_MEM_WBWA << 8)\n" +#~ "\n" +#~ "/* dimensiunea granulelor de 4 KiB pentru TTBR0_EL1. */\n" +#~ ".set .L_TCR_TG0_4KB, 0x0 << 14\n" +#~ "/* dimensiunea granulelor de 4 KiB pentru TTBR1_EL1. */\n" +#~ ".set .L_TCR_TG1_4KB, 0x2 << 30\n" +#~ "/* Dezactivează mersul pe tabela de traducere pentru TTBR1_EL1, generând " +#~ "în schimb o eroare de traducere. */\n" +#~ ".set .L_TCR_EPD1, 0x1 << 23\n" +#~ "/* Plimbările tabelelor de traducere pentru TTBR0_EL1 sunt partajabile la " +#~ "nivel intern. */\n" +#~ ".set .L_TCR_SH_INNER, 0x3 << 12\n" +#~ "/*\n" +#~ " * Mersul tabelelor de conversie pentru TTBR0_EL1 este de tip write-back " +#~ "extern read-allocate write-allocate\n" +#~ " * cu memorie cache.\n" +#~ " */\n" +#~ ".set .L_TCR_RGN_OWB, 0x1 << 10\n" +#~ "/*\n" +#~ " * Traducerea tabelelor de conversie pentru TTBR0_EL1 sunt de tip write-" +#~ "back read-allocate write-allocate interior\n" +#~ " * care pot fi stocate în memoria cache.\n" +#~ " */\n" +#~ ".set .L_TCR_RGN_IWB, 0x1 << 8\n" +#~ "/* Decalajul de dimensiune pentru TTBR0_EL1 este de 2**39 octeți (512 " +#~ "GiB). */\n" +#~ ".set .L_TCR_T0SZ_512, 64 - 39\n" +#~ ".set .Ltcrval, .L_TCR_TG0_4KB | .L_TCR_TG1_4KB | .L_TCR_EPD1 | ." +#~ "L_TCR_RGN_OWB\n" +#~ ".set .Ltcrval, .Ltcrval | .L_TCR_RGN_IWB | .L_TCR_SH_INNER | ." +#~ "L_TCR_T0SZ_512\n" +#~ "\n" +#~ "/* Nu este afectată capacitatea de stocare în memoria cache a accesului " +#~ "la instrucțiunile din etapa 1. */\n" +#~ ".set .L_SCTLR_ELx_I, 0x1 << 12\n" +#~ "/* Defecțiune de aliniere SP dacă SP nu este aliniat la o limită de 16 " +#~ "octeți. */\n" +#~ ".set .L_SCTLR_ELx_SA, 0x1 << 3\n" +#~ "/* Cacheabilitatea accesului la datele din etapa 1 nu este afectată. */\n" +#~ ".set .L_SCTLR_ELx_C, 0x1 << 2\n" +#~ "/* Etapa 1 a MMU EL0 și EL1 a fost activată. */\n" +#~ ".set .L_SCTLR_ELx_M, 0x1 << 0\n" +#~ "/* Privileged Access Never este neschimbat la luarea unei excepții la " +#~ "EL1. */\n" +#~ ".set .L_SCTLR_EL1_SPAN, 0x1 << 23\n" +#~ "/* Instrucțiunea SETEND dezactivată la EL0 în modul aarch32. */\n" +#~ ".set .L_SCTLR_EL1_SED, 0x1 << 8\n" +#~ "/* Diverse instrucțiuni IT sunt dezactivate la EL0 în modul aarch32. */\n" +#~ ".set .L_SCTLR_EL1_ITD, 0x1 << 7\n" +#~ ".set .L_SCTLR_EL1_RES1, (0x1 << 11) | (0x1 << 20) | (0x1 << 22) | (0x1 << " +#~ "28) | (0x1 << 29)\n" +#~ ".set .Lsctlrval, .L_SCTLR_ELx_M | .L_SCTLR_ELx_C | .L_SCTLR_ELx_SA | ." +#~ "L_SCTLR_EL1_ITD | .L_SCTLR_EL1_SED\n" +#~ ".set .Lsctlrval, .Lsctlrval | .L_SCTLR_ELx_I | .L_SCTLR_EL1_SPAN | ." +#~ "L_SCTLR_EL1_RES1\n" +#~ "\n" +#~ "/**\n" +#~ " * Acesta este un punct de intrare generic pentru o imagine. Acesta " +#~ "efectuează operațiile necesare pentru a pregăti imaginea\n" +#~ " * imaginea încărcată pentru a fi rulată. În mod specific, se resetează " +#~ "la zero secțiunea bss folosind registrele x25 și mai sus,\n" +#~ " * pregătește stiva, activează virgulă mobilă și stabilește vectorul de " +#~ "excepții. Păstrează x0-x3\n" +#~ " * pentru punctul de intrare Rust, deoarece acestea pot conține " +#~ "parametrii de pornire.\n" +#~ " */\n" +#~ ".section .init.entry, \"ax\"\n" +#~ ".global entry\n" +#~ "entry:\n" +#~ "\t/* Încarcă și aplică configurația de gestionare a memoriei, gata să " +#~ "activeze MMU și cache-urile. */\n" +#~ "\tadrp x30, idmap\n" +#~ "\tmsr ttbr0_el1, x30\n" +#~ "\n" +#~ "\tmov_i x30, .Lmairval\n" +#~ "\tmsr mair_el1, x30\n" +#~ "\n" +#~ "\tmov_i x30, .Ltcrval\n" +#~ "\t/* Copiază intervalul PA acceptat în TCR_EL1.IPS. */\n" +#~ "\tmrs x29, id_aa64mmfr0_el1\n" +#~ "\tbfi x30, x29, #32, #4\n" +#~ "\n" +#~ "\tmsr tcr_el1, x30\n" +#~ "\n" +#~ "\tmov_i x30, .Lsctlrval\n" +#~ "\n" +#~ "\t/*\n" +#~ "\t * Asigură-te că tot ceea ce s-a întâmplat înainte de acest punct s-a " +#~ "finalizat, apoi invalidează orice date potențial vechi\n" +#~ "\t * locale TLB înainte ca acestea să înceapă să fie utilizate.\n" +#~ "\t */\n" +#~ "\tisb\n" +#~ "\ttlbi vmalle1\n" +#~ "\tic iallu\n" +#~ "\tdsb nsh\n" +#~ "\tisb\n" +#~ "\n" +#~ "\t/*\n" +#~ "\t * Configurați sctlr_el1 pentru a activa MMU și memoria cache și nu " +#~ "continuați până când acest lucru nu este finalizat.\n" +#~ "\t */\n" +#~ "\tmsr sctlr_el1, x30\n" +#~ "\tisb\n" +#~ "\n" +#~ "\t/* Dezactivează captarea accesului în virgulă mobilă în EL1. */\n" +#~ "\tmrs x30, cpacr_el1\n" +#~ "\torr x30, x30, #(0x3 << 20)\n" +#~ "\tmsr cpacr_el1, x30\n" +#~ "\tisb\n" +#~ "\n" +#~ "\t/* Elimină secțiunea bss. */\n" +#~ "\tadr_l x29, bss_begin\n" +#~ "\tadr_l x30, bss_end\n" +#~ "0: cmp x29, x30\n" +#~ "\tb.hs 1f\n" +#~ "\tstp xzr, xzr, [x29], #16\n" +#~ "\tb 0b\n" +#~ "\n" +#~ "1: /* Pregătește stiva. */\n" +#~ "\tadr_l x30, boot_stack_end\n" +#~ "\tmov sp, x30\n" +#~ "\n" +#~ "\t/* Setează vectorul de excepție. */\n" +#~ "\tadr x30, vector_table_el1\n" +#~ "\tmsr vbar_el1, x30\n" +#~ "\n" +#~ "\t/* Apel în codul Rust. */\n" +#~ "\tbl main\n" +#~ "\n" +#~ "\t/* Bucla veșnică în așteptarea întreruperilor. */\n" +#~ "2: wfi\n" +#~ "\tb 2b\n" +#~ "```" + +#, fuzzy +#~ msgid "" +#~ "```armasm\n" +#~ "/*\n" +#~ " * Copyright 2023 Google LLC\n" +#~ " *\n" +#~ " * Licensed under the Apache License, Version 2.0 (the \"License\");\n" +#~ " * you may not use this file except in compliance with the License.\n" +#~ " * You may obtain a copy of the License at\n" +#~ " *\n" +#~ " * https://www.apache.org/licenses/LICENSE-2.0\n" +#~ " *\n" +#~ " * Unless required by applicable law or agreed to in writing, software\n" +#~ " * distributed under the License is distributed on an \"AS IS\" BASIS,\n" +#~ " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or " +#~ "implied.\n" +#~ " * See the License for the specific language governing permissions and\n" +#~ " * limitations under the License.\n" +#~ " */\n" +#~ "\n" +#~ "/**\n" +#~ " * Saves the volatile registers onto the stack. This currently takes 14\n" +#~ " * instructions, so it can be used in exception handlers with 18 " +#~ "instructions\n" +#~ " * left.\n" +#~ " *\n" +#~ " * On return, x0 and x1 are initialised to elr_el2 and spsr_el2 " +#~ "respectively,\n" +#~ " * which can be used as the first and second arguments of a subsequent " +#~ "call.\n" +#~ " */\n" +#~ ".macro save_volatile_to_stack\n" +#~ "\t/* Reserve stack space and save registers x0-x18, x29 & x30. */\n" +#~ "\tstp x0, x1, [sp, #-(8 * 24)]!\n" +#~ "\tstp x2, x3, [sp, #8 * 2]\n" +#~ "\tstp x4, x5, [sp, #8 * 4]\n" +#~ "\tstp x6, x7, [sp, #8 * 6]\n" +#~ "\tstp x8, x9, [sp, #8 * 8]\n" +#~ "\tstp x10, x11, [sp, #8 * 10]\n" +#~ "\tstp x12, x13, [sp, #8 * 12]\n" +#~ "\tstp x14, x15, [sp, #8 * 14]\n" +#~ "\tstp x16, x17, [sp, #8 * 16]\n" +#~ "\tstr x18, [sp, #8 * 18]\n" +#~ "\tstp x29, x30, [sp, #8 * 20]\n" +#~ "\n" +#~ "\t/*\n" +#~ "\t * Save elr_el1 & spsr_el1. This such that we can take nested " +#~ "exception\n" +#~ "\t * and still be able to unwind.\n" +#~ "\t */\n" +#~ "\tmrs x0, elr_el1\n" +#~ "\tmrs x1, spsr_el1\n" +#~ "\tstp x0, x1, [sp, #8 * 22]\n" +#~ ".endm\n" +#~ "\n" +#~ "/**\n" +#~ " * Restores the volatile registers from the stack. This currently takes " +#~ "14\n" +#~ " * instructions, so it can be used in exception handlers while still " +#~ "leaving 18\n" +#~ " * instructions left; if paired with save_volatile_to_stack, there are 4\n" +#~ " * instructions to spare.\n" +#~ " */\n" +#~ ".macro restore_volatile_from_stack\n" +#~ "\t/* Restore registers x2-x18, x29 & x30. */\n" +#~ "\tldp x2, x3, [sp, #8 * 2]\n" +#~ "\tldp x4, x5, [sp, #8 * 4]\n" +#~ "\tldp x6, x7, [sp, #8 * 6]\n" +#~ "\tldp x8, x9, [sp, #8 * 8]\n" +#~ "\tldp x10, x11, [sp, #8 * 10]\n" +#~ "\tldp x12, x13, [sp, #8 * 12]\n" +#~ "\tldp x14, x15, [sp, #8 * 14]\n" +#~ "\tldp x16, x17, [sp, #8 * 16]\n" +#~ "\tldr x18, [sp, #8 * 18]\n" +#~ "\tldp x29, x30, [sp, #8 * 20]\n" +#~ "\n" +#~ "\t/* Restore registers elr_el1 & spsr_el1, using x0 & x1 as scratch. */\n" +#~ "\tldp x0, x1, [sp, #8 * 22]\n" +#~ "\tmsr elr_el1, x0\n" +#~ "\tmsr spsr_el1, x1\n" +#~ "\n" +#~ "\t/* Restore x0 & x1, and release stack space. */\n" +#~ "\tldp x0, x1, [sp], #8 * 24\n" +#~ ".endm\n" +#~ "\n" +#~ "/**\n" +#~ " * This is a generic handler for exceptions taken at the current EL while " +#~ "using\n" +#~ " * SP0. It behaves similarly to the SPx case by first switching to SPx, " +#~ "doing\n" +#~ " * the work, then switching back to SP0 before returning.\n" +#~ " *\n" +#~ " * Switching to SPx and calling the Rust handler takes 16 instructions. " +#~ "To\n" +#~ " * restore and return we need an additional 16 instructions, so we can " +#~ "implement\n" +#~ " * the whole handler within the allotted 32 instructions.\n" +#~ " */\n" +#~ ".macro current_exception_sp0 handler:req\n" +#~ "\tmsr spsel, #1\n" +#~ "\tsave_volatile_to_stack\n" +#~ "\tbl \\handler\n" +#~ "\trestore_volatile_from_stack\n" +#~ "\tmsr spsel, #0\n" +#~ "\teret\n" +#~ ".endm\n" +#~ "\n" +#~ "/**\n" +#~ " * This is a generic handler for exceptions taken at the current EL while " +#~ "using\n" +#~ " * SPx. It saves volatile registers, calls the Rust handler, restores " +#~ "volatile\n" +#~ " * registers, then returns.\n" +#~ " *\n" +#~ " * This also works for exceptions taken from EL0, if we don't care about\n" +#~ " * non-volatile registers.\n" +#~ " *\n" +#~ " * Saving state and jumping to the Rust handler takes 15 instructions, " +#~ "and\n" +#~ " * restoring and returning also takes 15 instructions, so we can fit the " +#~ "whole\n" +#~ " * handler in 30 instructions, under the limit of 32.\n" +#~ " */\n" +#~ ".macro current_exception_spx handler:req\n" +#~ "\tsave_volatile_to_stack\n" +#~ "\tbl \\handler\n" +#~ "\trestore_volatile_from_stack\n" +#~ "\teret\n" +#~ ".endm\n" +#~ "\n" +#~ ".section .text.vector_table_el1, \"ax\"\n" +#~ ".global vector_table_el1\n" +#~ ".balign 0x800\n" +#~ "vector_table_el1:\n" +#~ "sync_cur_sp0:\n" +#~ "\tcurrent_exception_sp0 sync_exception_current\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "irq_cur_sp0:\n" +#~ "\tcurrent_exception_sp0 irq_current\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "fiq_cur_sp0:\n" +#~ "\tcurrent_exception_sp0 fiq_current\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "serr_cur_sp0:\n" +#~ "\tcurrent_exception_sp0 serr_current\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "sync_cur_spx:\n" +#~ "\tcurrent_exception_spx sync_exception_current\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "irq_cur_spx:\n" +#~ "\tcurrent_exception_spx irq_current\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "fiq_cur_spx:\n" +#~ "\tcurrent_exception_spx fiq_current\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "serr_cur_spx:\n" +#~ "\tcurrent_exception_spx serr_current\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "sync_lower_64:\n" +#~ "\tcurrent_exception_spx sync_lower\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "irq_lower_64:\n" +#~ "\tcurrent_exception_spx irq_lower\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "fiq_lower_64:\n" +#~ "\tcurrent_exception_spx fiq_lower\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "serr_lower_64:\n" +#~ "\tcurrent_exception_spx serr_lower\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "sync_lower_32:\n" +#~ "\tcurrent_exception_spx sync_lower\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "irq_lower_32:\n" +#~ "\tcurrent_exception_spx irq_lower\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "fiq_lower_32:\n" +#~ "\tcurrent_exception_spx fiq_lower\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "serr_lower_32:\n" +#~ "\tcurrent_exception_spx serr_lower\n" +#~ "```" +#~ msgstr "" +#~ "```armasm\n" +#~ "/*\n" +#~ " * Drepturi de autor 2023 Google LLC\n" +#~ " *\n" +#~ " * Licențiat sub licența Apache License, versiunea 2.0 (\"Licența\");\n" +#~ " * nu aveți voie să utilizați acest fișier decât în conformitate cu " +#~ "Licența.\n" +#~ " * Puteți obține o copie a Licenței la adresa\n" +#~ " *\n" +#~ " * https://www.apache.org/licenses/LICENSE-2.0\n" +#~ " *\n" +#~ " * Cu excepția cazului în care legislația aplicabilă o impune sau se " +#~ "convine în scris, software-ul\n" +#~ " * distribuit în temeiul licenței este distribuit pe o BAZĂ \"AS IS\",\n" +#~ " * FĂRĂ GARANȚII SAU CONDIȚII DE NICI UN FEL, fie ele exprese sau " +#~ "implicite.\n" +#~ " * Consultați Licența pentru limbajul specific care reglementează " +#~ "permisiunile și\n" +#~ " * limitări în cadrul Licenței.\n" +#~ " */\n" +#~ "\n" +#~ "/**\n" +#~ " * Salvează registrele volatile pe stivă. Acest lucru durează în prezent " +#~ "14\n" +#~ " * instrucțiuni, astfel încât poate fi utilizat în gestionarii de " +#~ "excepții cu 18 instrucțiuni\n" +#~ " * stânga.\n" +#~ " *\n" +#~ " * La întoarcere, x0 și x1 sunt inițializate la elr_el2 și, respectiv, " +#~ "spsr_el2,\n" +#~ " * care pot fi utilizate ca primul și al doilea argument al unui apel " +#~ "ulterior.\n" +#~ " */\n" +#~ ".macro save_volatile_to_stack\n" +#~ "\t/* Rezervă spațiul stivei și salvează registrele x0-x18, x29 & x30. */\n" +#~ "\tstp x0, x1, [sp, #-(8 * 24)]!\n" +#~ "\tstp x2, x3, [sp, #8 * 2]\n" +#~ "\tstp x4, x5, [sp, #8 * 4]\n" +#~ "\tstp x6, x7, [sp, #8 * 6]\n" +#~ "\tstp x8, x9, [sp, #8 * 8]\n" +#~ "\tstp x10, x11, [sp, #8 * 10]\n" +#~ "\tstp x12, x13, [sp, #8 * 12]\n" +#~ "\tstp x14, x15, [sp, #8 * 14]\n" +#~ "\tstp x16, x17, [sp, #8 * 16]\n" +#~ "\tstr x18, [sp, #8 * 18]\n" +#~ "\tstp x29, x30, [sp, #8 * 20]\n" +#~ "\n" +#~ "\t/*\n" +#~ "\t * Salvați elr_el1 & spsr_el1. Acest lucru astfel încât să putem lua " +#~ "excepții imbricate\n" +#~ "\t * și totuși să putem derula.\n" +#~ "\t */\n" +#~ "\tmrs x0, elr_el1\n" +#~ "\tmrs x1, spsr_el1\n" +#~ "\tstp x0, x1, [sp, #8 * 22]\n" +#~ ".endm\n" +#~ "\n" +#~ "/**\n" +#~ " * Restabilește registrele volatile din stivă. În prezent, acest lucru " +#~ "durează 14\n" +#~ " * instrucțiuni, astfel încât poate fi utilizată în gestionarii de " +#~ "excepții, lăsând în continuare 18\n" +#~ " * instrucțiuni rămase; dacă este asociat cu save_volatile_to_stack, mai " +#~ "rămân 4 instrucțiuni\n" +#~ " * instrucțiuni de rezervă.\n" +#~ " */\n" +#~ ".macro restore_volatile_from_stack\n" +#~ "\t/* Restaurează registrele x2-x18, x29 și x30. */\n" +#~ "\tldp x2, x3, [sp, #8 * 2]\n" +#~ "\tldp x4, x5, [sp, #8 * 4]\n" +#~ "\tldp x6, x7, [sp, #8 * 6]\n" +#~ "\tldp x8, x9, [sp, #8 * 8]\n" +#~ "\tldp x10, x11, [sp, #8 * 10]\n" +#~ "\tldp x12, x13, [sp, #8 * 12]\n" +#~ "\tldp x14, x15, [sp, #8 * 14]\n" +#~ "\tldp x16, x17, [sp, #8 * 16]\n" +#~ "\tldr x18, [sp, #8 * 18]\n" +#~ "\tldp x29, x30, [sp, #8 * 20]\n" +#~ "\n" +#~ "\t/* Restaurați registrele elr_el1 & spsr_el1, folosind x0 & x1 ca zero. " +#~ "*/\n" +#~ "\tldp x0, x1, [sp, #8 * 22]\n" +#~ "\tmsr elr_el1, x0\n" +#~ "\tmsr spsr_el1, x1\n" +#~ "\n" +#~ "\t/* Restaurați x0 & x1 și eliberați spațiul din stivă. */\n" +#~ "\tldp x0, x1, [sp], #8 * 24\n" +#~ ".endm\n" +#~ "\n" +#~ "/**\n" +#~ " * Acesta este un gestionar generic pentru excepțiile luate la EL curent " +#~ "în timp ce se utilizează\n" +#~ " * SP0. Se comportă în mod similar cu cazul SPx, trecând mai întâi la " +#~ "SPx, făcând\n" +#~ " * treaba, apoi revine la SP0 înainte de a se întoarce.\n" +#~ " *\n" +#~ " * Comutarea în SPx și apelarea gestionarului Rust necesită 16 " +#~ "instrucțiuni. La\n" +#~ " * restabilirea și întoarcerea avem nevoie de încă 16 instrucțiuni, " +#~ "astfel încât să putem implementa\n" +#~ " * întregul manipulator în cele 32 de instrucțiuni alocate.\n" +#~ " */\n" +#~ ".macro current_exception_sp0 handler:req\n" +#~ "\tmsr spsel, #1\n" +#~ "\tsave_volatile_to_stack\n" +#~ "\tbl \\handler\n" +#~ "\trestore_volatile_from_stack\n" +#~ "\tmsr spsel, #0\n" +#~ "\teret\n" +#~ ".endm\n" +#~ "\n" +#~ "/**\n" +#~ " * Acesta este un gestionar generic pentru excepțiile luate la EL curent " +#~ "în timp ce se utilizează\n" +#~ " * SPx. Acesta salvează registrele volatile, apelează gestionarul Rust, " +#~ "restabilește registrele volatile\n" +#~ " * și apoi se întoarce.\n" +#~ " *\n" +#~ " * Acest lucru funcționează și pentru excepțiile luate din EL0, dacă nu " +#~ "ne pasă de\n" +#~ " * registrele nevolatile.\n" +#~ " *\n" +#~ " * Salvarea stării și saltul la gestionarul Rust durează 15 instrucțiuni, " +#~ "iar\n" +#~ " * restabilirea și întoarcerea durează, de asemenea, 15 instrucțiuni, " +#~ "astfel încât putem încadra întreaga\n" +#~ " * în 30 de instrucțiuni, sub limita de 32.\n" +#~ " */\n" +#~ ".macro current_exception_spx handler:req\n" +#~ "\tsave_volatile_to_stack\n" +#~ "\tbl \\handler\n" +#~ "\trestore_volatile_from_stack\n" +#~ "\teret\n" +#~ ".endm\n" +#~ "\n" +#~ ".section .text.vector_table_el1, \"ax\"\n" +#~ ".global vector_table_el1\n" +#~ ".balign 0x800\n" +#~ "vector_table_el1:\n" +#~ "sync_cur_sp0:\n" +#~ "\tcurrent_exception_sp0 sync_exception_current\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "irq_cur_sp0:\n" +#~ "\tcurrent_exception_sp0 irq_current\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "fiq_cur_sp0:\n" +#~ "\tcurrent_exception_sp0 fiq_current\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "serr_cur_sp0:\n" +#~ "\tcurrent_exception_sp0 serr_current\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "sync_cur_spx:\n" +#~ "\tcurrent_exception_spx sync_exception_current\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "irq_cur_spx:\n" +#~ "\tcurrent_exception_spx irq_current\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "fiq_cur_spx:\n" +#~ "\tcurrent_exception_spx fiq_current\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "serr_cur_spx:\n" +#~ "\tcurrent_exception_spx serr_current\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "sync_lower_64:\n" +#~ "\tcurrent_exception_spx sync_lower\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "irq_lower_64:\n" +#~ "\tcurrent_exception_spx irq_lower\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "fiq_lower_64:\n" +#~ "\tcurrent_exception_spx fiq_lower\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "serr_lower_64:\n" +#~ "\tcurrent_exception_spx serr_lower\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "sync_lower_32:\n" +#~ "\tcurrent_exception_spx sync_lower\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "irq_lower_32:\n" +#~ "\tcurrent_exception_spx irq_lower\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "fiq_lower_32:\n" +#~ "\tcurrent_exception_spx fiq_lower\n" +#~ "\n" +#~ ".balign 0x80\n" +#~ "serr_lower_32:\n" +#~ "\tcurrent_exception_spx serr_lower\n" +#~ "```" + +#, fuzzy +#~ msgid "" +#~ "```armasm\n" +#~ "/*\n" +#~ " * Copyright 2023 Google LLC\n" +#~ " *\n" +#~ " * Licensed under the Apache License, Version 2.0 (the \"License\");\n" +#~ " * you may not use this file except in compliance with the License.\n" +#~ " * You may obtain a copy of the License at\n" +#~ " *\n" +#~ " * https://www.apache.org/licenses/LICENSE-2.0\n" +#~ " *\n" +#~ " * Unless required by applicable law or agreed to in writing, software\n" +#~ " * distributed under the License is distributed on an \"AS IS\" BASIS,\n" +#~ " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or " +#~ "implied.\n" +#~ " * See the License for the specific language governing permissions and\n" +#~ " * limitations under the License.\n" +#~ " */\n" +#~ "\n" +#~ ".set .L_TT_TYPE_BLOCK, 0x1\n" +#~ ".set .L_TT_TYPE_PAGE, 0x3\n" +#~ ".set .L_TT_TYPE_TABLE, 0x3\n" +#~ "\n" +#~ "/* Access flag. */\n" +#~ ".set .L_TT_AF, 0x1 << 10\n" +#~ "/* Not global. */\n" +#~ ".set .L_TT_NG, 0x1 << 11\n" +#~ ".set .L_TT_XN, 0x3 << 53\n" +#~ "\n" +#~ ".set .L_TT_MT_DEV, 0x0 << 2\t\t\t// MAIR #0 (DEV_nGnRE)\n" +#~ ".set .L_TT_MT_MEM, (0x1 << 2) | (0x3 << 8)\t// MAIR #1 (MEM_WBWA), inner " +#~ "shareable\n" +#~ "\n" +#~ ".set .L_BLOCK_DEV, .L_TT_TYPE_BLOCK | .L_TT_MT_DEV | .L_TT_AF | .L_TT_XN\n" +#~ ".set .L_BLOCK_MEM, .L_TT_TYPE_BLOCK | .L_TT_MT_MEM | .L_TT_AF | .L_TT_NG\n" +#~ "\n" +#~ ".section \".rodata.idmap\", \"a\", %progbits\n" +#~ ".global idmap\n" +#~ ".align 12\n" +#~ "idmap:\n" +#~ "\t/* level 1 */\n" +#~ "\t.quad\t\t.L_BLOCK_DEV | 0x0\t\t // 1 GiB of device mappings\n" +#~ "\t.quad\t\t.L_BLOCK_MEM | 0x40000000\t// 1 GiB of DRAM\n" +#~ "\t.fill\t\t254, 8, 0x0\t\t\t// 254 GiB of unmapped VA space\n" +#~ "\t.quad\t\t.L_BLOCK_DEV | 0x4000000000 // 1 GiB of device mappings\n" +#~ "\t.fill\t\t255, 8, 0x0\t\t\t// 255 GiB of remaining VA space\n" +#~ "```" +#~ msgstr "" +#~ "```armasm\n" +#~ "/*\n" +#~ " * Drepturi de autor 2023 Google LLC\n" +#~ " *\n" +#~ " * Licențiat sub licența Apache License, versiunea 2.0 (\"Licența\");\n" +#~ " * nu aveți voie să utilizați acest fișier decât în conformitate cu " +#~ "Licența.\n" +#~ " * Puteți obține o copie a Licenței la adresa\n" +#~ " *\n" +#~ " * https://www.apache.org/licenses/LICENSE-2.0\n" +#~ " *\n" +#~ " * Cu excepția cazului în care legislația aplicabilă o impune sau se " +#~ "convine în scris, software-ul\n" +#~ " * distribuit în temeiul licenței este distribuit pe o BAZĂ \"AS IS\",\n" +#~ " * FĂRĂ GARANȚII SAU CONDIȚII DE NICI UN FEL, fie ele exprese sau " +#~ "implicite.\n" +#~ " * Consultați Licența pentru limbajul specific care reglementează " +#~ "permisiunile și\n" +#~ " * limitări în cadrul Licenței.\n" +#~ " */\n" +#~ "\n" +#~ ".set .L_TT_TYPE_BLOCK, 0x1\n" +#~ ".set .L_TT_TYPE_PAGE, 0x3\n" +#~ ".set .L_TT_TYPE_TABLE, 0x3\n" +#~ "\n" +#~ "/* Indicator de acces. */\n" +#~ ".set .L_TT_AF, 0x1 << 10\n" +#~ "/* Nu este global. */\n" +#~ ".set .L_TT_NG, 0x1 << 11\n" +#~ ".set .L_TT_XN, 0x3 << 53\n" +#~ "\n" +#~ ".set .L_TT_MT_DEV, 0x0 << 2 // MAIR #0 (DEV_nGnRE)\n" +#~ ".set .L_TT_MT_MEM, (0x1 << 2) | (0x3 << 8) // MAIR #1 (MEM_WBWA), " +#~ "partajabil în interior\n" +#~ "\n" +#~ ".set .L_BLOCK_DEV, .L_TT_TYPE_BLOCK | .L_TT_MT_DEV | .L_TT_AF | .L_TT_XN\n" +#~ ".set .L_BLOCK_MEM, .L_TT_TYPE_BLOCK | .L_TT_MT_MEM | .L_TT_AF | .L_TT_NG\n" +#~ "\n" +#~ ".section \".rodata.idmap\", \"a\", %progbits\n" +#~ ".global idmap\n" +#~ ".align 12\n" +#~ "idmap:\n" +#~ "\t/* nivel 1 */\n" +#~ "\t.quad .L_BLOCK_DEV | 0x0 // 1 GiB de mapare a dispozitivelor\n" +#~ "\t.quad .L_BLOCK_MEM | 0x40000000 // 1 GiB de DRAM\n" +#~ "\t.fill 254, 8, 0x0 // 254 GiB de spațiu VA nemarcat\n" +#~ "\t.quad .L_BLOCK_DEV | 0x4000000000 // 1 GiB de mapare a dispozitivelor\n" +#~ "\t.fill 255, 8, 0x0 // 255 GiB de spațiu VA rămas\n" +#~ "```" + +#, fuzzy +#~ msgid "" +#~ "```ld\n" +#~ "/*\n" +#~ " * Copyright 2023 Google LLC\n" +#~ " *\n" +#~ " * Licensed under the Apache License, Version 2.0 (the \"License\");\n" +#~ " * you may not use this file except in compliance with the License.\n" +#~ " * You may obtain a copy of the License at\n" +#~ " *\n" +#~ " * https://www.apache.org/licenses/LICENSE-2.0\n" +#~ " *\n" +#~ " * Unless required by applicable law or agreed to in writing, software\n" +#~ " * distributed under the License is distributed on an \"AS IS\" BASIS,\n" +#~ " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or " +#~ "implied.\n" +#~ " * See the License for the specific language governing permissions and\n" +#~ " * limitations under the License.\n" +#~ " */\n" +#~ "\n" +#~ "/*\n" +#~ " * Code will start running at this symbol which is placed at the start of " +#~ "the\n" +#~ " * image.\n" +#~ " */\n" +#~ "ENTRY(entry)\n" +#~ "\n" +#~ "MEMORY\n" +#~ "{\n" +#~ "\timage : ORIGIN = 0x40080000, LENGTH = 2M\n" +#~ "}\n" +#~ "\n" +#~ "SECTIONS\n" +#~ "{\n" +#~ "\t/*\n" +#~ "\t * Collect together the code.\n" +#~ "\t */\n" +#~ "\t.init : ALIGN(4096) {\n" +#~ "\t\ttext_begin = .;\n" +#~ "\t\t*(.init.entry)\n" +#~ "\t\t*(.init.*)\n" +#~ "\t} >image\n" +#~ "\t.text : {\n" +#~ "\t\t*(.text.*)\n" +#~ "\t} >image\n" +#~ "\ttext_end = .;\n" +#~ "\n" +#~ "\t/*\n" +#~ "\t * Collect together read-only data.\n" +#~ "\t */\n" +#~ "\t.rodata : ALIGN(4096) {\n" +#~ "\t\trodata_begin = .;\n" +#~ "\t\t*(.rodata.*)\n" +#~ "\t} >image\n" +#~ "\t.got : {\n" +#~ "\t\t*(.got)\n" +#~ "\t} >image\n" +#~ "\trodata_end = .;\n" +#~ "\n" +#~ "\t/*\n" +#~ "\t * Collect together the read-write data including .bss at the end " +#~ "which\n" +#~ "\t * will be zero'd by the entry code.\n" +#~ "\t */\n" +#~ "\t.data : ALIGN(4096) {\n" +#~ "\t\tdata_begin = .;\n" +#~ "\t\t*(.data.*)\n" +#~ "\t\t/*\n" +#~ "\t\t * The entry point code assumes that .data is a multiple of 32\n" +#~ "\t\t * bytes long.\n" +#~ "\t\t */\n" +#~ "\t\t. = ALIGN(32);\n" +#~ "\t\tdata_end = .;\n" +#~ "\t} >image\n" +#~ "\n" +#~ "\t/* Everything beyond this point will not be included in the binary. */\n" +#~ "\tbin_end = .;\n" +#~ "\n" +#~ "\t/* The entry point code assumes that .bss is 16-byte aligned. */\n" +#~ "\t.bss : ALIGN(16) {\n" +#~ "\t\tbss_begin = .;\n" +#~ "\t\t*(.bss.*)\n" +#~ "\t\t*(COMMON)\n" +#~ "\t\t. = ALIGN(16);\n" +#~ "\t\tbss_end = .;\n" +#~ "\t} >image\n" +#~ "\n" +#~ "\t.stack (NOLOAD) : ALIGN(4096) {\n" +#~ "\t\tboot_stack_begin = .;\n" +#~ "\t\t. += 40 * 4096;\n" +#~ "\t\t. = ALIGN(4096);\n" +#~ "\t\tboot_stack_end = .;\n" +#~ "\t} >image\n" +#~ "\n" +#~ "\t. = ALIGN(4K);\n" +#~ "\tPROVIDE(dma_region = .);\n" +#~ "\n" +#~ "\t/*\n" +#~ "\t * Remove unused sections from the image.\n" +#~ "\t */\n" +#~ "\t/DISCARD/ : {\n" +#~ "\t\t/* The image loads itself so doesn't need these sections. */\n" +#~ "\t\t*(.gnu.hash)\n" +#~ "\t\t*(.hash)\n" +#~ "\t\t*(.interp)\n" +#~ "\t\t*(.eh_frame_hdr)\n" +#~ "\t\t*(.eh_frame)\n" +#~ "\t\t*(.note.gnu.build-id)\n" +#~ "\t}\n" +#~ "}\n" +#~ "```" +#~ msgstr "" +#~ "```ld\n" +#~ "/*\n" +#~ " * Drepturi de autor 2023 Google LLC\n" +#~ " *\n" +#~ " * Licențiat sub Licența Apache, versiunea 2.0 (denumită în continuare " +#~ "\"Licența\");\n" +#~ " * nu aveți voie să utilizați acest fișier decât în conformitate cu " +#~ "Licența.\n" +#~ " * Puteți obține o copie a Licenței la adresa\n" +#~ " *\n" +#~ " * https://www.apache.org/licenses/LICENSE-2.0\n" +#~ " *\n" +#~ " * Cu excepția cazului în care legislația aplicabilă o impune sau se " +#~ "convine în scris, software-ul\n" +#~ " * distribuit în temeiul licenței este distribuit pe o BAZĂ \"AS IS\",\n" +#~ " * FĂRĂ GARANȚII SAU CONDIȚII DE NICI UN FEL, fie ele exprese sau " +#~ "implicite.\n" +#~ " * Consultați Licența pentru limbajul specific care reglementează " +#~ "permisiunile și\n" +#~ " * limitări în cadrul Licenței.\n" +#~ " */\n" +#~ "\n" +#~ "/*\n" +#~ " * Codul va începe să ruleze la acest simbol care este plasat la " +#~ "începutul\n" +#~ " * imagine.\n" +#~ " */\n" +#~ "ENTRY(intrare)\n" +#~ "\n" +#~ "MEMORIE\n" +#~ "{\n" +#~ "\timage : ORIGIN = 0x40080000, LENGTH = 2M\n" +#~ "}\n" +#~ "\n" +#~ "SECȚIUNI\n" +#~ "{\n" +#~ "\t/*\n" +#~ "\t * Adunați împreună codul.\n" +#~ "\t */\n" +#~ "\t.init : ALIGN(4096) {\n" +#~ "\t\ttext_begin = ..;\n" +#~ "\t\t*(.init.entry)\n" +#~ "\t\t*(.init.*)\n" +#~ "\t} >imagine\n" +#~ "\t.text : {\n" +#~ "\t\t*(.text.*)\n" +#~ "\t} >imagine\n" +#~ "\ttext_end = ..;\n" +#~ "\n" +#~ "\t/*\n" +#~ "\t * Adună împreună datele numai pentru citire.\n" +#~ "\t */\n" +#~ "\t.rodata : ALIGN(4096) {\n" +#~ "\t\trodata_begin = ..;\n" +#~ "\t\t*(.rodata.*)\n" +#~ "\t} >imagine\n" +#~ "\t.got : {\n" +#~ "\t\t*(.got)\n" +#~ "\t} >imagine\n" +#~ "\trodata_end = .;\n" +#~ "\n" +#~ "\t/*\n" +#~ "\t * Colectează împreună datele de citire-scriere, inclusiv .bss de la " +#~ "sfârșit, care\n" +#~ "\t * va fi anulat de codul de intrare.\n" +#~ "\t */\n" +#~ "\t.data : ALIGN(4096) {\n" +#~ "\t\tdata_begin = ..;\n" +#~ "\t\t*(.data.*)\n" +#~ "\t\t/*\n" +#~ "\t\t * Codul punctului de intrare presupune că .data este un multiplu de " +#~ "32\n" +#~ "\t\t * octeți.\n" +#~ "\t\t */\n" +#~ "\t\t. = ALIGN(32);\n" +#~ "\t\tdata_end = .;\n" +#~ "\t} >imagine\n" +#~ "\n" +#~ "\t/* Tot ceea ce depășește acest punct nu va fi inclus în binar. */\n" +#~ "\tbin_end = ..;\n" +#~ "\n" +#~ "\t/* Codul punctului de intrare presupune că .bss este aliniat pe 16 " +#~ "octeți. */\n" +#~ "\t.bss : ALIGN(16) {\n" +#~ "\t\tbss_begin = ..;\n" +#~ "\t\t*(.bss.*)\n" +#~ "\t\t*(COMUN)\n" +#~ "\t\t. = ALIGN(16);\n" +#~ "\t\tbss_end = .;\n" +#~ "\t} >imagine\n" +#~ "\n" +#~ "\t.stack (NOLOAD) : ALIGN(4096) {\n" +#~ "\t\tboot_stack_begin = ..;\n" +#~ "\t\t. += 40 * 4096;\n" +#~ "\t\t. = ALIGN(4096);\n" +#~ "\t\tboot_stack_end = .;\n" +#~ "\t} >imagine\n" +#~ "\n" +#~ "\t. = ALIGN(4K);\n" +#~ "\tPROVIDE(dma_region = .);\n" +#~ "\n" +#~ "\t/*\n" +#~ "\t * Elimină secțiunile neutilizate din imagine.\n" +#~ "\t */\n" +#~ "\t/DISCARD/ : {\n" +#~ "\t\t/* Imaginea se încarcă singură, deci nu are nevoie de aceste " +#~ "secțiuni. */\n" +#~ "\t\t*(.gnu.hash)\n" +#~ "\t\t*(.hash)\n" +#~ "\t\t*(.interp)\n" +#~ "\t\t*(.eh_frame_hdr)\n" +#~ "\t\t*(.eh_frame)\n" +#~ "\t\t*(.note.gnu.build-id)\n" +#~ "\t}\n" +#~ "}\n" +#~ "```" + +#, fuzzy +#~ msgid "# Copyright 2023 Google LLC" +#~ msgstr "# Copyright 2023 Google LLC" + +#, fuzzy +#~ msgid "$(shell uname -s)" +#~ msgstr "$(shell uname -s)" + +#, fuzzy +#~ msgid "aarch64-linux-gnu" +#~ msgstr "aarch64-paging" + +#, fuzzy +#~ msgid "stdio -display none -kernel $< -s" +#~ msgstr "stdio -display none -kernel $< -s" + +#, fuzzy +#~ msgid "cargo clean" +#~ msgstr "marfă curată" + +#, fuzzy +#~ msgid "" +#~ "Notice that the thread is stopped before it reaches 10 --- the main " +#~ "thread is not waiting." +#~ msgstr "" +#~ "Observați că firul este oprit înainte de a ajunge la 10 - firul principal " +#~ "nu așteaptă." + +#, fuzzy +#~ msgid "" +#~ "For this, you will need an HTTP client such as [`reqwest`](https://docs." +#~ "rs/reqwest/). Create a new Cargo project and `reqwest` it as a dependency " +#~ "with:" +#~ msgstr "" +#~ "Pentru aceasta, veți avea nevoie de un client HTTP, cum ar fi [`reqwest`]" +#~ "(https://docs.rs/reqwest/). Creați un nou proiect Cargo și `reqwest` ca " +#~ "dependență cu:" + +#, fuzzy +#~ msgid "" +#~ "You will also need a way to find links. We can use [`scraper`](https://" +#~ "docs.rs/scraper/) for that:" +#~ msgstr "" +#~ "Veți avea nevoie, de asemenea, de o modalitate de a găsi legături. Putem " +#~ "folosi [`scraper`](https://docs.rs/scraper/) pentru asta:" + +#, fuzzy +#~ msgid "" +#~ "Finally, we'll need some way of handling errors. We use [`thiserror`]" +#~ "(https://docs.rs/thiserror/) for that:" +#~ msgstr "" +#~ "În cele din urmă, vom avea nevoie de o modalitate de gestionare a " +#~ "erorilor. Pentru aceasta, vom folosi [`thiserror`](https://docs.rs/" +#~ "thiserror/):" + +#, fuzzy +#~ msgid "" +#~ "Async methods in traits are not yet supported in the stable channel ([An " +#~ "experimental feature exists in nightly and should be stabilized in the " +#~ "mid term.](https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-" +#~ "trait-nightly.html))" +#~ msgstr "" +#~ "Metodele asincrone din trăsături nu sunt încă acceptate în canalul stabil " +#~ "([O caracteristică experimentală există în nightly și ar trebui să fie " +#~ "stabilizată pe termen mediu.](https://blog.rust-lang.org/inside-" +#~ "rust/2022/11/17/async-fn-in-trait-nightly.html))" + +#~ msgid "" +#~ "// Add a delay before picking the second fork to allow the execution\n" +#~ " // to transfer to another task\n" +#~ msgstr "" +#~ "// Adăugați o întârziere înainte de a alege a doua cale de execuție " +#~ "pentru a permite\n" +#~ " // transferul către o altă sarcină\n" + +#~ 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 "" +#~ "// Pentru a evita un blocaj, trebuie să rupem simetria\n" +#~ " // undeva. Acest lucru va schimba bifurcațiile de fire de " +#~ "execuție \n" +#~ " //fără a dezinitializa niciuna dintre ele.\n" + #~ msgid "Small Example" #~ msgstr "Un mic exemplu" @@ -25236,11 +29713,6 @@ msgstr "" #~ msgid "`String` vs `str`" #~ msgstr "String versus str" -#, fuzzy -#~ msgid "We can now understand the two string types in Rust:" -#~ msgstr "" -#~ "Acum putem înțelege cele două tipuri de șiruri de caractere în Rust:" - #, fuzzy #~ msgid "" #~ "```rust,editable\n" @@ -29972,14 +34444,6 @@ msgstr "" #~ "(https://doc.rust-lang.org/std/ops/trait.Mul.html), ... utilizate pentru " #~ "supraîncărcarea operatorilor, și" -#, fuzzy -#~ msgid "" -#~ "[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) " -#~ "used to construct a default instance of a type." -#~ msgstr "" -#~ "[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) " -#~ "utilizat pentru a construi o instanță implicită a unui tip." - #, fuzzy #~ msgid "" #~ "```rust,editable\n" @@ -36823,10 +41287,6 @@ msgstr "" #~ "}\n" #~ "```" -#, fuzzy -#~ msgid "argument:" -#~ msgstr "argument:" - #, fuzzy #~ msgid "build:" #~ msgstr "construi:" @@ -36946,10 +41406,6 @@ msgstr "" #~ msgid "reference counting:" #~ msgstr "numărarea de referință:" -#, fuzzy -#~ msgid "return:" -#~ msgstr "retur:" - #, fuzzy #~ msgid "safe:" #~ msgstr "sigur:" @@ -38254,8 +42710,8 @@ msgstr "" #~ " let Some(request_segment) = request_segments.next() else {\n" #~ " return false;\n" #~ " };\n" -#~ " if request_segment != prefix_segment && prefix_segment != " -#~ "\"*\" {\n" +#~ " if request_segment != prefix_segment && prefix_segment != \"*\" " +#~ "{\n" #~ " return false;\n" #~ " }\n" #~ " }\n" @@ -38324,8 +42780,8 @@ msgstr "" #~ " let Some(request_segment) = request_segments.next() else {\n" #~ " return false;\n" #~ " };\n" -#~ " if request_segment != prefix_segment && prefix_segment ! = " -#~ "\"*\" {\n" +#~ " if request_segment != prefix_segment && prefix_segment ! = \"*\" " +#~ "{\n" #~ " return false;\n" #~ " }\n" #~ " }\n"