diff --git a/po/uk.po b/po/uk.po index 6da10ad6992..260331e050c 100644 --- a/po/uk.po +++ b/po/uk.po @@ -2,15 +2,15 @@ msgid "" msgstr "" "Project-Id-Version: Comprehensive Rust 🦀\n" "POT-Creation-Date: 2023-09-19\n" -"PO-Revision-Date: 2023-09-12 22:06+0000\n" -"Last-Translator: Andrew Kushyk \n" +"PO-Revision-Date: 2023-10-18 20:05+0300\n" +"Last-Translator: Oleksandr Leoshko \n" "Language-Team: \n" -"Language: ua\n" +"Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.3.2\n" +"X-Generator: Poedit 3.4\n" #: src/SUMMARY.md:4 src/index.md:1 msgid "Welcome to Comprehensive Rust 🦀" @@ -376,7 +376,7 @@ msgstr "Стрічка" #: src/SUMMARY.md:114 msgid "Vec" -msgstr "" +msgstr "Vec" #: src/SUMMARY.md:115 msgid "HashMap" @@ -384,7 +384,7 @@ msgstr "Хеш-карта" #: src/SUMMARY.md:116 msgid "Box" -msgstr "" +msgstr "Коробка" #: src/SUMMARY.md:117 msgid "Recursive Data Types" @@ -396,11 +396,11 @@ msgstr "Нішева оптимізація" #: src/SUMMARY.md:119 msgid "Rc" -msgstr "" +msgstr "Rc" #: src/SUMMARY.md:120 msgid "Cell/RefCell" -msgstr "" +msgstr "Комірка/Посил.комірка" #: src/SUMMARY.md:121 src/modules.md:1 msgid "Modules" @@ -412,7 +412,7 @@ msgstr "Видимість" #: src/SUMMARY.md:123 src/modules/paths.md:1 msgid "Paths" -msgstr "" +msgstr "Шляхи" #: src/SUMMARY.md:124 src/modules/filesystem.md:1 msgid "Filesystem Hierarchy" @@ -469,7 +469,7 @@ msgstr "Обмеження трейту" #: src/SUMMARY.md:144 msgid "impl Trait" -msgstr "" +msgstr "impl Риса" #: src/SUMMARY.md:145 src/traits/important-traits.md:1 msgid "Important Traits" @@ -481,7 +481,7 @@ msgstr "Ітератор" #: src/SUMMARY.md:147 src/traits/from-iterator.md:1 msgid "FromIterator" -msgstr "" +msgstr "FromIterator" #: src/SUMMARY.md:148 msgid "From and Into" @@ -497,7 +497,7 @@ msgstr "Трейт `Drop`" #: src/SUMMARY.md:151 msgid "Default" -msgstr "" +msgstr "За замовчуванням" #: src/SUMMARY.md:152 msgid "Operators: Add, Mul, ..." @@ -640,7 +640,7 @@ msgstr "Бібліотека" #: src/SUMMARY.md:197 src/android/aidl.md:1 msgid "AIDL" -msgstr "" +msgstr "AIDL" #: src/SUMMARY.md:198 msgid "Interface" @@ -701,7 +701,7 @@ msgstr "Залізо: Ранок" #: src/SUMMARY.md:219 msgid "no_std" -msgstr "" +msgstr "no_std" #: src/SUMMARY.md:220 msgid "A Minimal Example" @@ -709,7 +709,7 @@ msgstr "Мінімальний приклад" #: src/SUMMARY.md:221 msgid "alloc" -msgstr "" +msgstr "виділення" #: src/SUMMARY.md:222 src/bare-metal/microcontrollers.md:1 msgid "Microcontrollers" @@ -737,11 +737,11 @@ msgstr "Шаблон стану типу" #: src/SUMMARY.md:228 msgid "embedded-hal" -msgstr "" +msgstr "embedded-hal" #: src/SUMMARY.md:229 msgid "probe-rs, cargo-embed" -msgstr "" +msgstr "зонд-рс, вантаж-вклад" #: src/SUMMARY.md:230 src/bare-metal/microcontrollers/debugging.md:1 msgid "Debugging" @@ -814,27 +814,27 @@ msgstr "Корисні крейти" #: src/SUMMARY.md:253 msgid "zerocopy" -msgstr "" +msgstr "нульова копія" #: src/SUMMARY.md:254 msgid "aarch64-paging" -msgstr "" +msgstr "aarch64-paging" #: src/SUMMARY.md:255 msgid "buddy_system_allocator" -msgstr "" +msgstr "buddy_system_allocator" #: src/SUMMARY.md:256 msgid "tinyvec" -msgstr "" +msgstr "tinyvec" #: src/SUMMARY.md:257 msgid "spin" -msgstr "" +msgstr "спина" #: src/SUMMARY.md:259 src/bare-metal/android/vmbase.md:1 msgid "vmbase" -msgstr "" +msgstr "vmbase" #: src/SUMMARY.md:261 msgid "RTC Driver" @@ -870,11 +870,11 @@ msgstr "Send та Sync" #: src/SUMMARY.md:274 msgid "Send" -msgstr "" +msgstr "Надіслати" #: src/SUMMARY.md:274 msgid "Sync" -msgstr "" +msgstr "Синхронізувати" #: src/SUMMARY.md:277 src/concurrency/send-sync/examples.md:1 msgid "Examples" @@ -886,148 +886,147 @@ msgstr "Спільний стан" #: src/SUMMARY.md:279 msgid "Arc" -msgstr "" +msgstr "Арк" #: src/SUMMARY.md:280 msgid "Mutex" -msgstr "" +msgstr "Mutex" #: src/SUMMARY.md:283 src/SUMMARY.md:304 #: src/exercises/concurrency/dining-philosophers.md:1 #: src/exercises/concurrency/solutions-morning.md:3 msgid "Dining Philosophers" -msgstr "" +msgstr "Обідні філософи" #: src/SUMMARY.md:284 src/exercises/concurrency/link-checker.md:1 msgid "Multi-threaded Link Checker" -msgstr "" +msgstr "Перевірка багатопоточних посилань" #: src/SUMMARY.md:286 msgid "Concurrency: Afternoon" -msgstr "" +msgstr "Паралельність: після обіду" #: src/SUMMARY.md:288 msgid "Async Basics" -msgstr "" +msgstr "Основи асинхронізації" #: src/SUMMARY.md:289 msgid "async/await" -msgstr "" +msgstr "async/чекати" #: src/SUMMARY.md:290 src/async/futures.md:1 msgid "Futures" -msgstr "" +msgstr "Ф'ючерси" #: src/SUMMARY.md:291 src/async/runtimes.md:1 msgid "Runtimes" -msgstr "" +msgstr "Час виконання" #: src/SUMMARY.md:292 src/async/runtimes/tokio.md:1 msgid "Tokio" -msgstr "" +msgstr "Токіо" #: src/SUMMARY.md:293 src/exercises/concurrency/link-checker.md:126 #: src/async/tasks.md:1 src/exercises/concurrency/chat-app.md:143 msgid "Tasks" -msgstr "" +msgstr "Завдання" #: src/SUMMARY.md:294 src/async/channels.md:1 msgid "Async Channels" -msgstr "" +msgstr "Асинхронні канали" #: src/SUMMARY.md:296 src/async/control-flow/join.md:1 msgid "Join" -msgstr "" +msgstr "Приєднуйтесь" #: src/SUMMARY.md:297 src/async/control-flow/select.md:1 msgid "Select" -msgstr "" +msgstr "Виберіть" #: src/SUMMARY.md:298 msgid "Pitfalls" -msgstr "" +msgstr "Підводні камені" #: src/SUMMARY.md:299 msgid "Blocking the Executor" -msgstr "" +msgstr "Блокування Виконавця" #: src/SUMMARY.md:300 src/async/pitfalls/pin.md:1 msgid "Pin" -msgstr "" +msgstr "Pin" #: src/SUMMARY.md:301 src/async/pitfalls/async-traits.md:1 msgid "Async Traits" -msgstr "" +msgstr "Асинхронні риси" #: src/SUMMARY.md:302 src/async/pitfalls/cancellation.md:1 -#, fuzzy msgid "Cancellation" msgstr "Встановлення" #: src/SUMMARY.md:305 src/exercises/concurrency/chat-app.md:1 #: src/exercises/concurrency/solutions-afternoon.md:119 msgid "Broadcast Chat Application" -msgstr "" +msgstr "Програма широкомовного чату" #: src/SUMMARY.md:308 msgid "Final Words" -msgstr "" +msgstr "Заключні слова" #: src/SUMMARY.md:312 src/thanks.md:1 msgid "Thanks!" -msgstr "" +msgstr "Дякую!" #: src/SUMMARY.md:313 msgid "Other Resources" -msgstr "" +msgstr "Інші ресурси" #: src/SUMMARY.md:314 src/credits.md:1 msgid "Credits" -msgstr "" +msgstr "Кредити" #: src/SUMMARY.md:317 src/exercises/solutions.md:1 msgid "Solutions" -msgstr "" +msgstr "Рішення" #: src/SUMMARY.md:322 msgid "Day 1 Morning" -msgstr "" +msgstr "День 1 Ранок" #: src/SUMMARY.md:323 msgid "Day 1 Afternoon" -msgstr "" +msgstr "День 1 Після обіду" #: src/SUMMARY.md:324 msgid "Day 2 Morning" -msgstr "" +msgstr "День 2 Ранок" #: src/SUMMARY.md:325 msgid "Day 2 Afternoon" -msgstr "" +msgstr "День 2 Після обіду" #: src/SUMMARY.md:326 msgid "Day 3 Morning" -msgstr "" +msgstr "День 3 Ранок" #: src/SUMMARY.md:327 msgid "Day 3 Afternoon" -msgstr "" +msgstr "День 3 Після обіду" #: src/SUMMARY.md:328 msgid "Bare Metal Rust Morning" -msgstr "" +msgstr "Голий металевий ранок іржі" #: src/SUMMARY.md:329 src/exercises/bare-metal/solutions-afternoon.md:1 msgid "Bare Metal Rust Afternoon" -msgstr "" +msgstr "Bare Metal Rust Afternoon" #: src/SUMMARY.md:330 msgid "Concurrency Morning" -msgstr "" +msgstr "Паралельність Ранок" #: src/SUMMARY.md:331 msgid "Concurrency Afternoon" -msgstr "" +msgstr "Одночасний обід" #: src/index.md:3 msgid "" @@ -1040,9 +1039,16 @@ msgid "" "io/github/stars/google/comprehensive-rust?style=flat-square)](https://github." "com/google/comprehensive-rust/stargazers)" msgstr "" +"[![Робочий процес створення](https://img.shields.io/github/actions/workflow/" +"status/google/comprehensive-rust/build.yml?style=flat-square)](https://" +"github.com /google/comprehensive-rust/actions/workflows/build.yml?" +"query=branch%3Amain) [![Учасники GitHub](https://img.shields.io/github/" +"contributors/google/comprehensive-rust?style= плоский квадрат)](https://" +"github.com/google/comprehensive-rust/graphs/contributors) [![зірки GitHub]" +"(https://img.shields.io/github/stars/google/comprehensive-rust ?style=flat-" +"square)](https://github.com/google/comprehensive-rust/stargazers)" #: src/index.md:7 -#, fuzzy 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 " @@ -1059,6 +1065,9 @@ msgid "" "comprehensive-rust/>. If you are reading somewhere else, please check there " "for updates." msgstr "" +"Останню версію курсу можна знайти за адресою . Якщо ви читаєте десь в іншому місці, перевіряйте там " +"оновлення." #: src/index.md:15 msgid "" @@ -1082,10 +1091,9 @@ msgstr "Показати розповсюджені ідіоми мови Rust." #: src/index.md:22 msgid "We call the first three course days Rust Fundamentals." -msgstr "" +msgstr "Перші три дні курсу ми називаємо Rust Fundamentals." #: src/index.md:24 -#, fuzzy msgid "" "Building on this, you're invited to dive into one or more specialized topics:" msgstr "" @@ -1102,7 +1110,6 @@ msgstr "" "Java." #: src/index.md:28 -#, fuzzy msgid "" "[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal " "(embedded) development. Both microcontrollers and application processors are " @@ -1113,7 +1120,6 @@ msgstr "" "звичайні процесори." #: src/index.md:31 -#, fuzzy msgid "" "[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We " "cover both classical concurrency (preemptively scheduling using threads and " @@ -1138,7 +1144,6 @@ msgstr "" "що виходять за межі курсу:" #: src/index.md:42 -#, fuzzy msgid "" "Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]" "(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]" @@ -1153,7 +1158,6 @@ msgid "Assumptions" msgstr "Пропозиції" #: src/index.md:48 -#, fuzzy 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 " @@ -1165,7 +1169,6 @@ msgstr "" "Rust." #: src/index.md:52 -#, fuzzy 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." @@ -1205,6 +1208,12 @@ msgid "" "The downside of longer session is that people can become very tired after 6 " "full hours of class in the afternoon." msgstr "" +"Зазвичай ми проводимо заняття з 10:00 до 16:00, з 1-годинною перервою на " +"обід посередині. Це залишає 2,5 години для ранкового заняття та 2,5 години " +"для післяобіднього. Зауважте, що це лише рекомендація: ви також можете " +"приділити 3 години ранковому заняттю, щоб дати людям більше часу для вправ. " +"Недоліком довшого заняття є те, що люди можуть дуже втомитися після 6 повних " +"годин занять у другій половині дня." #: src/running-the-course.md:16 msgid "Before you run the course, you will want to:" @@ -1311,20 +1320,23 @@ msgstr "" #: src/running-the-course/course-structure.md:5 msgid "Rust Fundamentals" -msgstr "" +msgstr "Основи Rust" #: src/running-the-course/course-structure.md:7 msgid "" "The first three days make up [Rust Fundaments](../welcome-day-1.md). The " "days are fast paced and we cover a lot of ground:" msgstr "" +"Перші три дні складають [Основи Rust](../welcome-day-1.md). Дні " +"швидкоплинні, і ми охоплюємо багато місць:" #: src/running-the-course/course-structure.md:10 msgid "Day 1: Basic Rust, syntax, control flow, creating and consuming values." msgstr "" +"День 1: Базовий Rust, синтаксис, потік керування, створення та використання " +"значень." #: src/running-the-course/course-structure.md:11 -#, fuzzy msgid "" "Day 2: Memory management, ownership, compound data types, and the standard " "library." @@ -1332,7 +1344,6 @@ msgstr "" "День 2: Складові типи даних, зіставлення із зразком, стандартна бібліотека." #: src/running-the-course/course-structure.md:12 -#, fuzzy msgid "Day 3: Generics, traits, error handling, testing, and unsafe Rust." msgstr "" "День 3: Трейти та узагальнення, обробка помилок, тестування, небезпечний " @@ -1352,10 +1363,9 @@ msgstr "" #: src/running-the-course/course-structure.md:19 msgid "Rust in Android" -msgstr "" +msgstr "Rust в Android" #: src/running-the-course/course-structure.md:21 -#, fuzzy 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 " @@ -1392,10 +1402,9 @@ msgstr "" #: src/running-the-course/course-structure.md:37 msgid "Bare-Metal Rust" -msgstr "" +msgstr "Іржа голого металу" #: src/running-the-course/course-structure.md:39 -#, fuzzy 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 " @@ -1418,12 +1427,10 @@ msgstr "" "md)." #: src/running-the-course/course-structure.md:48 -#, fuzzy msgid "Concurrency in Rust" msgstr "Конкурентність" #: src/running-the-course/course-structure.md:50 -#, fuzzy msgid "" "The [Concurrency in Rust](../concurrency.md) deep dive is a full day class " "on classical as well as `async`/`await` concurrency." @@ -1506,7 +1513,6 @@ msgid "" msgstr "Курс був перекладений іншими мовами групою чудових волонтерів:" #: src/running-the-course/translations.md:6 -#, fuzzy msgid "" "[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) " "by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github." @@ -1518,7 +1524,6 @@ msgstr "" "github.com/hugojacob)." #: src/running-the-course/translations.md:7 -#, fuzzy msgid "" "[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]" "(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp) and " @@ -1537,7 +1542,6 @@ msgstr "" "між мовами." #: src/running-the-course/translations.md:11 -#, fuzzy msgid "Incomplete Translations" msgstr "Переклади" @@ -1546,9 +1550,10 @@ msgid "" "There is a large number of in-progress translations. We link to the most " "recently updated translations:" msgstr "" +"Існує велика кількість незавершених перекладів. Ми посилаємося на останні " +"оновлені переклади:" #: src/running-the-course/translations.md:16 -#, fuzzy msgid "" "[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]" "(https://github.com/raselmandol)." @@ -1558,7 +1563,6 @@ msgstr "" "github.com/hugojacob)." #: src/running-the-course/translations.md:17 -#, fuzzy msgid "" "[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]" "(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen)." @@ -1568,7 +1572,6 @@ msgstr "" "github.com/hugojacob)." #: src/running-the-course/translations.md:18 -#, fuzzy msgid "" "[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]" "(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw)." @@ -1578,7 +1581,6 @@ msgstr "" "github.com/hugojacob)." #: src/running-the-course/translations.md:19 -#, fuzzy msgid "" "[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]" "(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/" @@ -1621,10 +1623,9 @@ msgstr "Встановлення" #: src/cargo.md:10 msgid "**Please follow the instructions on .**" -msgstr "" +msgstr "**Дотримуйтесь інструкцій на .**" #: src/cargo.md:12 -#, fuzzy 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 " @@ -1635,7 +1636,6 @@ msgstr "" "налаштування крос-компіляції і т.д." #: src/cargo.md:16 -#, fuzzy msgid "" "On Debian/Ubuntu, you can also install Cargo, the Rust source and the [Rust " "formatter](https://github.com/rust-lang/rustfmt) via `apt`. However, this " @@ -1653,7 +1653,6 @@ msgid "" msgstr "" #: src/cargo.md:22 -#, fuzzy msgid "" "We suggest using [VS Code](https://code.visualstudio.com/) to edit the code " "(but any LSP compatible editor works with rust-analyzer[3](https://rust-" @@ -1696,7 +1695,6 @@ msgstr "" "інші проміжні формати." #: src/cargo/rust-ecosystem.md:8 -#, fuzzy msgid "" "`cargo`: the Rust dependency manager and build tool. Cargo knows how to " "download dependencies, usually hosted on , and it will " @@ -1763,6 +1761,8 @@ msgid "" "Dependencies can also be resolved from alternative [registries](https://doc." "rust-lang.org/cargo/reference/registries.html), git, folders, and more." msgstr "" +"Залежності також можна вирішити за допомогою альтернативних [реєстрів]" +"(https://doc.rust-lang.org/cargo/reference/registries.html), git, папок тощо." #: src/cargo/rust-ecosystem.md:34 msgid "" @@ -1960,6 +1960,8 @@ msgid "" "You can use any later version too since Rust maintains backwards " "compatibility." msgstr "" +"Ви також можете використовувати будь-яку пізнішу версію, оскільки Rust " +"підтримує зворотну сумісність." #: src/cargo/running-locally.md:17 msgid "" @@ -2103,44 +2105,51 @@ msgstr "" #: src/welcome-day-1.md:1 msgid "Welcome to Day 1" -msgstr "" +msgstr "Ласкаво просимо до Дня 1" #: src/welcome-day-1.md:3 msgid "" "This is the first day of Rust Fundamentals. We will cover a lot of ground " "today:" msgstr "" +"Це перший день Rust Fundamentals. Сьогодні ми розглянемо багато питань:" #: src/welcome-day-1.md:6 msgid "" "Basic Rust syntax: variables, scalar and compound types, enums, structs, " "references, functions, and methods." msgstr "" +"Базовий синтаксис Rust: змінні, скалярні та складені типи, переліки, " +"структури, посилання, функції та методи." #: src/welcome-day-1.md:9 msgid "" "Control flow constructs: `if`, `if let`, `while`, `while let`, `break`, and " "`continue`." msgstr "" +"Конструкції потоку керування: `if`, `if let`, `while`, `while let`, `break` " +"і `continue`." #: src/welcome-day-1.md:12 msgid "Pattern matching: destructuring enums, structs, and arrays." -msgstr "" +msgstr "Зіставлення шаблонів: деструктурування переліків, структур і масивів." #: src/welcome-day-1.md:16 msgid "Please remind the students that:" -msgstr "" +msgstr "Нагадайте учням, що:" #: src/welcome-day-1.md:18 msgid "" "They should ask questions when they get them, don't save them to the end." msgstr "" +"Вони повинні задавати питання, коли вони їх отримають, не зберігайте їх до " +"кінця." #: src/welcome-day-1.md:19 msgid "" "The class is meant to be interactive and discussions are very much " "encouraged!" -msgstr "" +msgstr "Клас має бути інтерактивним, тому дискусії дуже заохочуються!" #: src/welcome-day-1.md:20 msgid "" @@ -2150,11 +2159,18 @@ msgid "" "allowing discussions since they engage people much more than one-way " "communication." msgstr "" +"Як інструктор, ви повинні намагатися підтримувати обговорення актуальними, " +"тобто підтримувати обговорення, пов’язані з тим, як Rust щось робить проти " +"іншої мови. Може бути важко знайти правильний баланс, але дозвольте " +"обговорення, оскільки вони залучають людей набагато більше, ніж одностороннє " +"спілкування." #: src/welcome-day-1.md:24 msgid "" "The questions will likely mean that we talk about things ahead of the slides." msgstr "" +"Запитання, швидше за все, означатимуть, що ми обговорюємо речі напередодні " +"слайдів." #: src/welcome-day-1.md:25 msgid "" @@ -2162,6 +2178,8 @@ msgid "" "Remember that the slides are just a support and you are free to skip them as " "you like." msgstr "" +"Це цілком нормально! Повторення є важливою частиною навчання. Пам’ятайте, що " +"слайди є лише підтримкою, і ви можете пропускати їх, як забажаєте." #: src/welcome-day-1.md:29 msgid "" @@ -2169,109 +2187,122 @@ msgid "" "speak about the famous borrow checker. The way Rust handles memory is a " "major feature and we should show students this right away." msgstr "" +"Ідея першого дня полягає в тому, щоб показати _рівно стільки_ Rust, щоб " +"можна було говорити про знамениту перевірку позик. Те, як Rust обробляє " +"пам’ять, є головною особливістю, і ми повинні негайно показати це студентам." #: src/welcome-day-1.md:33 msgid "" "If you're teaching this in a classroom, this is a good place to go over the " "schedule. We suggest splitting the day into two parts (following the slides):" msgstr "" +"Якщо ви викладаєте це в класі, це гарне місце, щоб переглянути розклад. " +"Пропонуємо розділити день на дві частини (за слайдами):" #: src/welcome-day-1.md:36 msgid "Morning: 9:00 to 12:00," -msgstr "" +msgstr "Ранок: з 9:00 до 12:00," #: src/welcome-day-1.md:37 msgid "Afternoon: 13:00 to 16:00." -msgstr "" +msgstr "Післяобідній час: з 13:00 до 16:00." #: src/welcome-day-1.md:39 msgid "" "You can of course adjust this as necessary. Please make sure to include " "breaks, we recommend a break every hour!" msgstr "" +"Ви, звичайно, можете налаштувати це за потреби. Будь ласка, обов’язково " +"передбачте перерви, ми рекомендуємо перерву щогодини!" #: src/welcome-day-1/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):" msgstr "" +"Rust — це нова мова програмування, яка випустила [1.0 у 2015 році](https://" +"blog.rust-lang.org/2015/05/15/Rust-1.0.html):" #: src/welcome-day-1/what-is-rust.md:5 msgid "Rust is a statically compiled language in a similar role as C++" msgstr "" +"Rust — це статично скомпільована мова, яка виконує таку саму роль, як C++" #: src/welcome-day-1/what-is-rust.md:6 msgid "`rustc` uses LLVM as its backend." -msgstr "" +msgstr "`rustc` використовує LLVM як серверну частину." #: src/welcome-day-1/what-is-rust.md:7 msgid "" "Rust supports many [platforms and architectures](https://doc.rust-lang.org/" "nightly/rustc/platform-support.html):" msgstr "" +"Rust підтримує багато [платформ і архітектур](https://doc.rust-lang.org/" +"nightly/rustc/platform-support.html):" #: src/welcome-day-1/what-is-rust.md:9 msgid "x86, ARM, WebAssembly, ..." -msgstr "" +msgstr "x86, ARM, WebAssembly, ..." #: src/welcome-day-1/what-is-rust.md:10 msgid "Linux, Mac, Windows, ..." -msgstr "" +msgstr "Linux, Mac, Windows, ..." #: src/welcome-day-1/what-is-rust.md:11 msgid "Rust is used for a wide range of devices:" -msgstr "" +msgstr "Rust використовується для широкого спектру пристроїв:" #: src/welcome-day-1/what-is-rust.md:12 msgid "firmware and boot loaders," -msgstr "" +msgstr "прошивки та завантажувачі," #: src/welcome-day-1/what-is-rust.md:13 msgid "smart displays," -msgstr "" +msgstr "розумні дисплеї," #: src/welcome-day-1/what-is-rust.md:14 msgid "mobile phones," -msgstr "" +msgstr "мобільні телефони," #: src/welcome-day-1/what-is-rust.md:15 msgid "desktops," -msgstr "" +msgstr "робочі столи," #: src/welcome-day-1/what-is-rust.md:16 msgid "servers." -msgstr "" +msgstr "серверів." #: src/welcome-day-1/what-is-rust.md:21 msgid "Rust fits in the same area as C++:" -msgstr "" +msgstr "Rust відповідає тій самій області, що й C++:" #: src/welcome-day-1/what-is-rust.md:23 msgid "High flexibility." -msgstr "" +msgstr "Висока гнучкість." #: src/welcome-day-1/what-is-rust.md:24 msgid "High level of control." -msgstr "" +msgstr "Високий рівень контролю." #: src/welcome-day-1/what-is-rust.md:25 msgid "" "Can be scaled down to very constrained devices such as microcontrollers." -msgstr "" +msgstr "Можна зменшити до дуже обмежених пристроїв, таких як мікроконтролери." #: src/welcome-day-1/what-is-rust.md:26 msgid "Has no runtime or garbage collection." -msgstr "" +msgstr "Не має часу виконання або збирання сміття." #: src/welcome-day-1/what-is-rust.md:27 msgid "Focuses on reliability and safety without sacrificing performance." -msgstr "" +msgstr "Зосереджено на надійності та безпеці без шкоди для продуктивності." #: src/hello-world.md:3 msgid "" "Let us jump into the simplest possible Rust program, a classic Hello World " "program:" msgstr "" +"Перейдемо до найпростішої програми Rust, класичної програми Hello World:" #: src/hello-world.md:6 msgid "" @@ -2284,27 +2315,28 @@ msgstr "" #: src/hello-world.md:12 msgid "What you see:" -msgstr "" +msgstr "Що ти бачиш:" #: src/hello-world.md:14 msgid "Functions are introduced with `fn`." -msgstr "" +msgstr "Функції вводяться за допомогою `fn`." #: src/hello-world.md:15 msgid "Blocks are delimited by curly braces like in C and C++." -msgstr "" +msgstr "Блоки розділені фігурними дужками, як у C і C++." #: src/hello-world.md:16 msgid "The `main` function is the entry point of the program." -msgstr "" +msgstr "Функція `main` є точкою входу в програму." #: src/hello-world.md:17 msgid "Rust has hygienic macros, `println!` is an example of this." -msgstr "" +msgstr "Rust має гігієнічні макроси, `println!` є прикладом цього." #: src/hello-world.md:18 msgid "Rust strings are UTF-8 encoded and can contain any Unicode character." msgstr "" +"Рядки Rust мають кодування UTF-8 і можуть містити будь-які символи Unicode." #: src/hello-world.md:22 msgid "" @@ -2312,22 +2344,30 @@ msgid "" "see a ton of it over the next three days so we start small with something " "familiar." msgstr "" +"Цей слайд спрямований на те, щоб студенти звикли працювати з кодом Rust. " +"Вони побачать масу цього протягом наступних трьох днів, тож ми починаємо з " +"малого з чогось знайомого." #: src/hello-world.md:27 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." msgstr "" +"Rust дуже схожий на інші мови традиції C/C++/Java. Це обов’язково, і воно не " +"намагається винайти щось заново, якщо це не є абсолютно необхідним." #: src/hello-world.md:31 msgid "Rust is modern with full support for things like Unicode." -msgstr "" +msgstr "Rust сучасний із повною підтримкою таких речей, як Unicode." #: src/hello-world.md:33 msgid "" "Rust uses macros for situations where you want to have a variable number of " "arguments (no function [overloading](basic-syntax/functions-interlude.md))." msgstr "" +"Rust використовує макроси для ситуацій, коли потрібно мати змінну кількість " +"аргументів (немає функції [перевантаження](basic-syntax/functions-interlude." +"md))." #: src/hello-world.md:36 msgid "" @@ -2336,6 +2376,10 @@ msgid "" "hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene." "html)." msgstr "" +"Макроси є «гігієнічними» означає, що вони випадково не захоплюють " +"ідентифікатори з області, у якій вони використовуються. Макроси Rust " +"насправді лише [частково гігієнічні](https://veykril.github.io/tlborm/decl-" +"macros/minutiae/hygiene .html)." #: src/hello-world.md:40 msgid "" @@ -2344,10 +2388,15 @@ msgid "" "while it is not a functional language, it includes a range of [functional " "concepts](https://doc.rust-lang.org/book/ch13-00-functional-features.html)." msgstr "" +"Іржа є мультипарадигмою. Наприклад, він має потужні [функції об’єктно-" +"орієнтованого програмування](https://doc.rust-lang.org/book/ch17-00-oop." +"html), і, хоча це не функціональна мова, він включає діапазон " +"[функціональних понять](https://doc.rust-lang.org/book/ch13-00-functional-" +"features.html)." #: src/hello-world/small-example.md:3 msgid "Here is a small example program in Rust:" -msgstr "" +msgstr "Ось невеликий приклад програми в Rust:" #: src/hello-world/small-example.md:5 msgid "" @@ -2374,6 +2423,8 @@ msgid "" "will always end, but this is not yet proved. Edit the code and play with " "different inputs." msgstr "" +"Код реалізує гіпотезу Коллатца: вважається, що цикл завжди закінчується, але " +"це ще не доведено. Редагуйте код і грайте з різними введеннями." #: src/hello-world/small-example.md:29 msgid "" @@ -2381,22 +2432,29 @@ msgid "" "trigger type inference. Try with `i8` instead and trigger a runtime integer " "overflow." msgstr "" +"Поясніть, що всі змінні мають статичний тип. Спробуйте видалити `i32`, щоб " +"активувати визначення типу. Натомість спробуйте використати `i8` і запустіть " +"цілочисельне переповнення під час виконання." #: src/hello-world/small-example.md:32 msgid "Change `let mut x` to `let x`, discuss the compiler error." -msgstr "" +msgstr "Змініть `let mut x` на `let x`, обговоріть помилку компілятора." #: src/hello-world/small-example.md:34 msgid "" "Show how `print!` gives a compilation error if the arguments don't match the " "format string." msgstr "" +"Покажіть, як `print!` видає помилку компіляції, якщо аргументи не " +"відповідають рядку формату." #: src/hello-world/small-example.md:37 msgid "" "Show how you need to use `{}` as a placeholder if you want to print an " "expression which is more complex than just a single variable." msgstr "" +"Покажіть, як вам потрібно використовувати `{}` як заповнювач, якщо ви хочете " +"надрукувати вираз, складніший за одну змінну." #: src/hello-world/small-example.md:40 msgid "" @@ -2404,34 +2462,41 @@ msgid "" "fmt` which has the rules of the formatting mini-language. It's important " "that the students become familiar with searching in the standard library." msgstr "" +"Покажіть студентам стандартну бібліотеку, покажіть їм, як шукати `std::fmt`, " +"який містить правила міні-мови форматування. Важливо, щоб учні ознайомилися " +"з пошуком у стандартній бібліотеці." #: src/hello-world/small-example.md:44 msgid "" "In a shell `rustup doc std::fmt` will open a browser on the local std::fmt " "documentation" msgstr "" +"У оболонці `rustup doc std::fmt` відкриє браузер локальної документації std::" +"fmt" #: src/why-rust.md:3 msgid "Some unique selling points of Rust:" -msgstr "" +msgstr "Деякі унікальні переваги Rust:" #: src/why-rust.md:5 msgid "Compile time memory safety." -msgstr "" +msgstr "Безпека пам'яті часу компіляції." #: src/why-rust.md:6 msgid "Lack of undefined runtime behavior." -msgstr "" +msgstr "Відсутність невизначеної поведінки під час виконання." #: src/why-rust.md:7 msgid "Modern language features." -msgstr "" +msgstr "Сучасні мовні особливості." #: src/why-rust.md:11 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 "" +"Обов’язково запитайте в класу, якими мовами вони мають досвід. Залежно від " +"відповіді ви можете виділити різні функції Rust:" #: src/why-rust.md:14 msgid "" @@ -2440,6 +2505,11 @@ msgid "" "have the memory unsafety issues. In addition, you get a modern language with " "constructs like pattern matching and built-in dependency management." msgstr "" +"Досвід роботи з C або C++: Rust усуває цілий клас _помилок виконання_ за " +"допомогою засобу перевірки запозичень. Ви отримуєте продуктивність, як у C і " +"C++, але у вас немає проблем із небезпекою пам’яті. Крім того, ви отримуєте " +"сучасну мову з такими конструкціями, як зіставлення шаблонів і вбудоване " +"керування залежностями." #: src/why-rust.md:19 msgid "" @@ -2448,47 +2518,52 @@ msgid "" "addition you get fast and predictable performance like C and C++ (no garbage " "collector) as well as access to low-level hardware (should you need it)" msgstr "" +"Досвід роботи з Java, Go, Python, JavaScript...: Ви отримуєте таку саму " +"безпеку пам’яті, що й у цих мовах, а також подібне відчуття мови високого " +"рівня. Крім того, ви отримуєте швидку та передбачувану продуктивність, як-от " +"C і C++ (без збирача сміття), а також доступ до апаратного забезпечення " +"низького рівня (якщо воно вам знадобиться)" #: src/why-rust/compile-time.md:3 msgid "Static memory management at compile time:" -msgstr "" +msgstr "Керування статичною пам'яттю під час компіляції:" #: src/why-rust/compile-time.md:5 msgid "No uninitialized variables." -msgstr "" +msgstr "Немає неініціалізованих змінних." #: src/why-rust/compile-time.md:6 msgid "No memory leaks (_mostly_, see notes)." -msgstr "" +msgstr "Немає витоків пам'яті (_переважно_, див. примітки)." #: src/why-rust/compile-time.md:7 msgid "No double-frees." -msgstr "" +msgstr "Ніяких подвійних звільнень." #: src/why-rust/compile-time.md:8 msgid "No use-after-free." -msgstr "" +msgstr "Без використання після безкоштовного використання." #: src/why-rust/compile-time.md:9 msgid "No `NULL` pointers." -msgstr "" +msgstr "Немає вказівників `NULL`." #: src/why-rust/compile-time.md:10 msgid "No forgotten locked mutexes." -msgstr "" +msgstr "Немає забутих заблокованих м'ютексів." #: src/why-rust/compile-time.md:11 msgid "No data races between threads." -msgstr "" +msgstr "Немає перегонів даних між потоками." #: src/why-rust/compile-time.md:12 msgid "No iterator invalidation." -msgstr "" +msgstr "Немає недійсності ітератора." #: src/why-rust/compile-time.md:16 msgid "" "It is possible to produce memory leaks in (safe) Rust. Some examples are:" -msgstr "" +msgstr "У (безпечному) Rust можливі витоки пам’яті. Деякі приклади:" #: src/why-rust/compile-time.md:19 msgid "" @@ -2496,6 +2571,10 @@ msgid "" "html#method.leak) to leak a pointer. A use of this could be to get runtime-" "initialized and runtime-sized static variables" msgstr "" +"Ви можете використовувати [`Box::leak`](https://doc.rust-lang.org/std/boxed/" +"struct.Box.html#method.leak) для витоку покажчика. Це може бути використано " +"для отримання статичних змінних, ініціалізованих під час виконання та " +"розміром під час виконання" #: src/why-rust/compile-time.md:21 msgid "" @@ -2503,36 +2582,45 @@ msgid "" "html) to make the compiler \"forget\" about a value (meaning the destructor " "is never run)." msgstr "" +"Ви можете використовувати [`std::mem::forget`](https://doc.rust-lang.org/std/" +"mem/fn.forget.html), щоб змусити компілятор «забути» про значення (тобто " +"деструктор ніколи не запускається)." #: src/why-rust/compile-time.md:23 msgid "" "You can also accidentally create a [reference cycle](https://doc.rust-lang." "org/book/ch15-06-reference-cycles.html) with `Rc` or `Arc`." msgstr "" +"Ви також можете випадково створити [довідковий цикл](https://doc.rust-lang." +"org/book/ch15-06-reference-cycles.html) за допомогою `Rc` або `Arc`." #: src/why-rust/compile-time.md:25 msgid "" "In fact, some will consider infinitely populating a collection a memory leak " "and Rust does not protect from those." msgstr "" +"Фактично, дехто вважатиме нескінченне заповнення колекції витоком пам’яті, а " +"Rust від цього не захищає." #: src/why-rust/compile-time.md:28 msgid "" "For the purpose of this course, \"No memory leaks\" should be understood as " "\"Pretty much no _accidental_ memory leaks\"." msgstr "" +"Для цілей цього курсу «Немає витоків пам’яті» слід розуміти як «Практично " +"немає _випадкових_ витоків пам’яті»." #: src/why-rust/runtime.md:3 msgid "No undefined behavior at runtime:" -msgstr "" +msgstr "Немає невизначеної поведінки під час виконання:" #: src/why-rust/runtime.md:5 msgid "Array access is bounds checked." -msgstr "" +msgstr "Доступ до масиву перевірено на межі." #: src/why-rust/runtime.md:6 msgid "Integer overflow is defined (panic or wrap-around)." -msgstr "" +msgstr "Визначається цілочисельне переповнення (паніка або обертання)." #: src/why-rust/runtime.md:12 msgid "" @@ -2543,6 +2631,12 @@ msgid "" "panics in debug mode (`cargo build`) and wrap-around in release mode (`cargo " "build --release`)." msgstr "" +"Цілочисельне переповнення визначається за допомогою позначки [`overflow-" +"checks`](https://doc.rust-lang.org/rustc/codegen-options/index.html#overflow-" +"checks) під час компіляції. Якщо ввімкнути, програма виникне паніка " +"(контрольований збій програми), інакше ви отримаєте семантику обертання. За " +"замовчуванням ви отримуєте паніку в режимі налагодження (`cargo build`) і " +"обертання в режимі випуску (`cargo build --release`)." #: src/why-rust/runtime.md:18 msgid "" @@ -2551,50 +2645,54 @@ msgid "" "call functions such as `slice::get_unchecked` which does not do bounds " "checking." msgstr "" +"Перевірку меж не можна вимкнути за допомогою позначки компілятора. Його " +"також не можна вимкнути безпосередньо за допомогою ключового слова `unsafe`. " +"Однак `unsafe` дозволяє викликати такі функції, як `slice::get_unchecked`, " +"яка не виконує перевірку меж." #: src/why-rust/modern.md:3 msgid "Rust is built with all the experience gained in the last decades." -msgstr "" +msgstr "Rust будується з усім досвідом, набутим за останні десятиліття." #: src/why-rust/modern.md:5 msgid "Language Features" -msgstr "" +msgstr "Особливості мови" #: src/why-rust/modern.md:7 msgid "Enums and pattern matching." -msgstr "" +msgstr "Переліки та зіставлення шаблонів." #: src/why-rust/modern.md:8 msgid "Generics." -msgstr "" +msgstr "Дженерики." #: src/why-rust/modern.md:9 msgid "No overhead FFI." -msgstr "" +msgstr "Без накладних FFI." #: src/why-rust/modern.md:10 msgid "Zero-cost abstractions." -msgstr "" +msgstr "Абстракції без витрат." #: src/why-rust/modern.md:12 msgid "Tooling" -msgstr "" +msgstr "Інструменти" #: src/why-rust/modern.md:14 msgid "Great compiler errors." -msgstr "" +msgstr "Великі помилки компілятора." #: src/why-rust/modern.md:15 msgid "Built-in dependency manager." -msgstr "" +msgstr "Вбудований менеджер залежностей." #: src/why-rust/modern.md:16 msgid "Built-in support for testing." -msgstr "" +msgstr "Вбудована підтримка тестування." #: src/why-rust/modern.md:17 msgid "Excellent Language Server Protocol support." -msgstr "" +msgstr "Чудова підтримка протоколу мовного сервера." #: src/why-rust/modern.md:23 msgid "" @@ -2603,6 +2701,11 @@ msgid "" "writing a loop using `for` should result in roughly the same low level " "instructions as using the `.iter().fold()` construct." msgstr "" +"Абстракції з нульовою вартістю, подібні до C++, означають, що вам не " +"потрібно «платити» за конструкції програмування вищого рівня за допомогою " +"пам’яті чи процесора. Наприклад, написання циклу за допомогою `for` має " +"призвести до приблизно тих самих інструкцій низького рівня, що й " +"використання конструкції `.iter().fold()`." #: src/why-rust/modern.md:28 msgid "" @@ -2610,6 +2713,9 @@ msgid "" "known as 'sum types', which allow the type system to express things like " "`Option` and `Result`." msgstr "" +"Можливо, варто згадати, що переліки Rust — це «алгебраїчні типи даних», " +"також відомі як «типи сум», які дозволяють системі типів виражати такі речі, " +"як «Option» і «Result»." #: src/why-rust/modern.md:32 msgid "" @@ -2618,6 +2724,10 @@ msgid "" "talkative than other compilers. It will often provide you with _actionable_ " "feedback, ready to copy-paste into your code." msgstr "" +"Нагадайте людям прочитати помилки --- багато розробників звикли ігнорувати " +"довгий вихід компілятора. Компілятор Rust значно балакучіший, ніж інші " +"компілятори. Він часто надає вам _дієві_ відгуки, готові скопіювати та " +"вставити у ваш код." #: src/why-rust/modern.md:37 msgid "" @@ -2625,18 +2735,21 @@ msgid "" "and Go. Rust does not come with several things you might consider standard " "and essential:" msgstr "" +"Стандартна бібліотека Rust невелика порівняно з такими мовами, як Java, " +"Python і Go. У Rust немає кількох речей, які ви можете вважати стандартними " +"та важливими:" #: src/why-rust/modern.md:41 msgid "a random number generator, but see [rand](https://docs.rs/rand/)." -msgstr "" +msgstr "генератор випадкових чисел, але див. [rand](https://docs.rs/rand/)." #: src/why-rust/modern.md:42 msgid "support for SSL or TLS, but see [rusttls](https://docs.rs/rustls/)." -msgstr "" +msgstr "підтримка SSL або TLS, але див. [rusttls](https://docs.rs/rustls/)." #: src/why-rust/modern.md:43 msgid "support for JSON, but see [serde_json](https://docs.rs/serde_json/)." -msgstr "" +msgstr "підтримка JSON, але див. [serde_json](https://docs.rs/serde_json/)." #: src/why-rust/modern.md:45 msgid "" @@ -2645,6 +2758,10 @@ msgid "" "Rust community is still working on finding the best solution --- and perhaps " "there isn't a single \"best solution\" for some of these things." msgstr "" +"Причиною цього є те, що функціональність стандартної бібліотеки не може " +"зникнути, тому вона має бути дуже стабільною. Для наведених вище прикладів " +"спільнота Rust все ще працює над пошуком найкращого рішення --- і, можливо, " +"для деяких із цих речей не існує єдиного \"найкращого рішення\"." #: src/why-rust/modern.md:50 msgid "" @@ -2652,6 +2769,9 @@ msgid "" "makes it trivial to download and compile third-party crates. A consequence " "of this is that the standard library can be smaller." msgstr "" +"Rust постачається з вбудованим менеджером пакунків у формі Cargo, і це " +"спрощує завантаження та компіляцію ящиків сторонніх розробників. Наслідком " +"цього є те, що стандартна бібліотека може бути меншою." #: src/why-rust/modern.md:54 msgid "" @@ -2659,139 +2779,148 @@ msgid "" "lib.rs/> help with this by letting you compare health metrics for crates to " "find a good and trusted one." msgstr "" +"Виявлення хороших ящиків сторонніх виробників може бути проблемою. Такі " +"сайти, як , допомагають у цьому, дозволяючи порівнювати " +"показники здоров’я ящиків, щоб знайти хороший і надійний." #: src/why-rust/modern.md:58 msgid "" "[rust-analyzer](https://rust-analyzer.github.io/) is a well supported LSP " "implementation used in major IDEs and text editors." msgstr "" +"[rust-analyzer](https://rust-analyzer.github.io/) — це добре підтримувана " +"реалізація LSP, яка використовується в основних IDE і текстових редакторах." #: src/basic-syntax.md:3 msgid "Much of the Rust syntax will be familiar to you from C, C++ or Java:" -msgstr "" +msgstr "Значна частина синтаксису Rust буде вам знайома з C, C++ або Java:" #: src/basic-syntax.md:5 msgid "Blocks and scopes are delimited by curly braces." -msgstr "" +msgstr "Блоки та області поділяються фігурними дужками." #: src/basic-syntax.md:6 msgid "" "Line comments are started with `//`, block comments are delimited by `/* ... " "*/`." msgstr "" +"Коментарі до рядків починаються з `//`, коментарі до блоків відокремлюються " +"`/* ... */`." #: src/basic-syntax.md:8 msgid "Keywords like `if` and `while` work the same." -msgstr "" +msgstr "Такі ключові слова, як «якщо» та «поки» працюють однаково." #: src/basic-syntax.md:9 msgid "Variable assignment is done with `=`, comparison is done with `==`." msgstr "" +"Присвоєння змінної виконується за допомогою `=`, порівняння — за допомогою " +"`==`." #: src/basic-syntax/scalar-types.md:3 src/basic-syntax/compound-types.md:3 #: src/exercises/day-3/safe-ffi-wrapper.md:16 msgid "Types" -msgstr "" +msgstr "Типи" #: src/basic-syntax/scalar-types.md:3 src/basic-syntax/compound-types.md:3 msgid "Literals" -msgstr "" +msgstr "Літерали" #: src/basic-syntax/scalar-types.md:5 msgid "Signed integers" -msgstr "" +msgstr "Цілі числа зі знаком" #: src/basic-syntax/scalar-types.md:5 msgid "`i8`, `i16`, `i32`, `i64`, `i128`, `isize`" -msgstr "" +msgstr "`i8`, `i16`, `i32`, `i64`, `i128`, `isize`" #: src/basic-syntax/scalar-types.md:5 msgid "`-10`, `0`, `1_000`, `123_i64`" -msgstr "" +msgstr "\"-10\", \"0\", \"1_000\", \"123_i64\"" #: src/basic-syntax/scalar-types.md:6 msgid "Unsigned integers" -msgstr "" +msgstr "Беззнакові цілі числа" #: src/basic-syntax/scalar-types.md:6 msgid "`u8`, `u16`, `u32`, `u64`, `u128`, `usize`" -msgstr "" +msgstr "`u8`, `u16`, `u32`, `u64`, `u128`, `usize`" #: src/basic-syntax/scalar-types.md:6 msgid "`0`, `123`, `10_u16`" -msgstr "" +msgstr "`0`, `123`, `10_u16`" #: src/basic-syntax/scalar-types.md:7 msgid "Floating point numbers" -msgstr "" +msgstr "Числа з плаваючою комою" #: src/basic-syntax/scalar-types.md:7 msgid "`f32`, `f64`" -msgstr "" +msgstr "`f32`, `f64`" #: src/basic-syntax/scalar-types.md:7 msgid "`3.14`, `-10.0e20`, `2_f32`" -msgstr "" +msgstr "`3.14`, `-10.0e20`, `2_f32`" #: src/basic-syntax/scalar-types.md:8 msgid "Strings" -msgstr "" +msgstr "рядки" #: src/basic-syntax/scalar-types.md:8 msgid "`&str`" -msgstr "" +msgstr "`&str`" #: src/basic-syntax/scalar-types.md:8 msgid "`\"foo\"`, `\"two\\nlines\"`" -msgstr "" +msgstr "`\"foo\"`, `\"два\\nрядки\"`" #: src/basic-syntax/scalar-types.md:9 msgid "Unicode scalar values" -msgstr "" +msgstr "Скалярні значення Unicode" #: src/basic-syntax/scalar-types.md:9 msgid "`char`" -msgstr "" +msgstr "`char`" #: src/basic-syntax/scalar-types.md:9 msgid "`'a'`, `'α'`, `'∞'`" -msgstr "" +msgstr "`'a'`, `'α'`, `'∞'`" #: src/basic-syntax/scalar-types.md:10 msgid "Booleans" -msgstr "" +msgstr "Логічні значення" #: src/basic-syntax/scalar-types.md:10 msgid "`bool`" -msgstr "" +msgstr "`bool`" #: src/basic-syntax/scalar-types.md:10 msgid "`true`, `false`" -msgstr "" +msgstr "`true`, `false`" #: src/basic-syntax/scalar-types.md:12 msgid "The types have widths as follows:" -msgstr "" +msgstr "Типи мають наступну ширину:" #: src/basic-syntax/scalar-types.md:14 msgid "`iN`, `uN`, and `fN` are _N_ bits wide," -msgstr "" +msgstr "`iN`, `uN` і `fN` мають ширину _N_ біт," #: src/basic-syntax/scalar-types.md:15 msgid "`isize` and `usize` are the width of a pointer," -msgstr "" +msgstr "`isize` і `usize` – це ширина покажчика," #: src/basic-syntax/scalar-types.md:16 msgid "`char` is 32 bits wide," -msgstr "" +msgstr "`char` має ширину 32 біти," #: src/basic-syntax/scalar-types.md:17 msgid "`bool` is 8 bits wide." -msgstr "" +msgstr "`bool` має ширину 8 біт." #: src/basic-syntax/scalar-types.md:21 msgid "There are a few syntaxes which are not shown above:" -msgstr "" +msgstr "Є кілька синтаксисів, які не показано вище:" #: src/basic-syntax/scalar-types.md:23 msgid "" @@ -2799,6 +2928,9 @@ msgid "" "`r\"\\n\" == \"\\\\n\"`. You can embed double-quotes by using an equal " "amount of `#` on either side of the quotes:" msgstr "" +"Необроблені рядки дозволяють створювати значення `&str` з вимкненими " +"екранами: `r\"\\n\" == \"\\\\n\"`. Ви можете вставити подвійні лапки, " +"використовуючи однакову кількість `#` з обох боків лапок:" #: src/basic-syntax/scalar-types.md:27 msgid "" @@ -2812,7 +2944,7 @@ msgstr "" #: src/basic-syntax/scalar-types.md:34 msgid "Byte strings allow you to create a `&[u8]` value directly:" -msgstr "" +msgstr "Рядки байтів дозволяють безпосередньо створювати значення `&[u8]`:" #: src/basic-syntax/scalar-types.md:36 msgid "" @@ -2830,10 +2962,13 @@ msgid "" "`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written " "as `123i64`." msgstr "" +"Усі підкреслення в цифрах можна опускати, вони призначені лише для " +"розбірливості. Отже, `1_000` можна записати як `1000` (або `10_00`), а " +"`123_i64` можна записати як `123i64`." #: src/basic-syntax/compound-types.md:5 msgid "Arrays" -msgstr "" +msgstr "Масиви" #: src/basic-syntax/compound-types.md:5 msgid "`[T; N]`" @@ -2845,19 +2980,19 @@ msgstr "" #: src/basic-syntax/compound-types.md:6 msgid "Tuples" -msgstr "" +msgstr "Кортежі" #: src/basic-syntax/compound-types.md:6 msgid "`()`, `(T,)`, `(T1, T2)`, ..." -msgstr "" +msgstr "\"()\", \"(T,)\", \"(T1, T2)\", ..." #: src/basic-syntax/compound-types.md:6 msgid "`()`, `('x',)`, `('x', 1.2)`, ..." -msgstr "" +msgstr "`()`, `('x',)`, `('x', 1.2)`, ..." #: src/basic-syntax/compound-types.md:8 msgid "Array assignment and access:" -msgstr "" +msgstr "Призначення масиву та доступ:" #: src/basic-syntax/compound-types.md:10 msgid "" @@ -2872,7 +3007,7 @@ msgstr "" #: src/basic-syntax/compound-types.md:18 msgid "Tuple assignment and access:" -msgstr "" +msgstr "Присвоєння кортежу та доступ:" #: src/basic-syntax/compound-types.md:20 msgid "" @@ -2887,7 +3022,7 @@ msgstr "" #: src/basic-syntax/compound-types.md:32 msgid "Arrays:" -msgstr "" +msgstr "Масиви:" #: src/basic-syntax/compound-types.md:34 msgid "" @@ -2899,7 +3034,7 @@ msgstr "" #: src/basic-syntax/compound-types.md:38 msgid "We can use literals to assign values to arrays." -msgstr "" +msgstr "Ми можемо використовувати літерали для призначення значень масивам." #: src/basic-syntax/compound-types.md:40 msgid "" @@ -2908,30 +3043,38 @@ msgid "" "the debug output. We could also have used `{a}` and `{a:?}` without " "specifying the value after the format string." msgstr "" +"У головній функції оператор print запитує реалізацію налагодження за " +"допомогою параметра формату `?`: `{}` дає вихід за замовчуванням, `{:?}` дає " +"вихід налагодження. Ми також могли використовувати `{a}` і `{a:?}` без " +"вказівки значення після рядка формату." #: src/basic-syntax/compound-types.md:45 msgid "" "Adding `#`, eg `{a:#?}`, invokes a \"pretty printing\" format, which can be " "easier to read." msgstr "" +"Додавання `#`, наприклад `{a:#?}`, викликає формат \"гарного друку\", який " +"може бути легшим для читання." #: src/basic-syntax/compound-types.md:47 msgid "Tuples:" -msgstr "" +msgstr "Кортежі:" #: src/basic-syntax/compound-types.md:49 msgid "Like arrays, tuples have a fixed length." -msgstr "" +msgstr "Як і масиви, кортежі мають фіксовану довжину." #: src/basic-syntax/compound-types.md:51 msgid "Tuples group together values of different types into a compound type." -msgstr "" +msgstr "Кортежі групують значення різних типів у складений тип." #: src/basic-syntax/compound-types.md:53 msgid "" "Fields of a tuple can be accessed by the period and the index of the value, " "e.g. `t.0`, `t.1`." msgstr "" +"Доступ до полів кортежу можна отримати за крапкою та індексом значення, " +"наприклад. `t.0`, `t.1`." #: src/basic-syntax/compound-types.md:55 msgid "" @@ -2940,16 +3083,22 @@ msgid "" "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 "" +"Порожній кортеж `()` також відомий як \"тип одиниці\". Це і тип, і єдине " +"дійсне значення цього типу, тобто і тип, і його значення виражаються як " +"`()`. Він використовується, наприклад, щоб вказати, що функція або вираз не " +"мають значення, що повертається, як ми побачимо на наступному слайді." #: src/basic-syntax/compound-types.md:59 msgid "" "You can think of it as `void` that can be familiar to you from other " "programming languages." msgstr "" +"Ви можете думати про це як про «пустоту», яка може бути знайома вам з інших " +"мов програмування." #: src/basic-syntax/references.md:3 msgid "Like C++, Rust has references:" -msgstr "" +msgstr "Як і C++, Rust має посилання:" #: src/basic-syntax/references.md:5 msgid "" @@ -2965,25 +3114,31 @@ msgstr "" #: src/basic-syntax/references.md:14 msgid "Some notes:" -msgstr "" +msgstr "Деякі примітки:" #: src/basic-syntax/references.md:16 msgid "" "We must dereference `ref_x` when assigning to it, similar to C and C++ " "pointers." msgstr "" +"Ми повинні розіменувати ref_x під час призначення, подібно до покажчиків C і " +"C++." #: src/basic-syntax/references.md:17 msgid "" "Rust will auto-dereference in some cases, in particular when invoking " "methods (try `ref_x.count_ones()`)." msgstr "" +"У деяких випадках Rust виконує автоматичне розіменування, зокрема під час " +"виклику методів (спробуйте ref_x.count_ones())." #: src/basic-syntax/references.md:19 msgid "" "References that are declared as `mut` can be bound to different values over " "their lifetime." msgstr "" +"Посилання, оголошені як `mut`, можуть бути пов’язані з різними значеннями " +"протягом свого життя." #: src/basic-syntax/references.md:25 msgid "" @@ -2992,10 +3147,14 @@ msgid "" "to different values, while the second represents a reference to a mutable " "value." msgstr "" +"Обов’язково зверніть увагу на різницю між `let mut ref_x: &i32` і `let " +"ref_x: &mut i32`. Перше представляє змінне посилання, яке може бути " +"прив’язане до різних значень, тоді як друге представляє посилання на змінне " +"значення." #: src/basic-syntax/references-dangling.md:3 msgid "Rust will statically forbid dangling references:" -msgstr "" +msgstr "Rust статично забороняє висячі посилання:" #: src/basic-syntax/references-dangling.md:5 msgid "" @@ -3013,21 +3172,23 @@ msgstr "" #: src/basic-syntax/references-dangling.md:16 msgid "A reference is said to \"borrow\" the value it refers to." -msgstr "" +msgstr "Кажуть, що посилання «позичає» значення, на яке воно посилається." #: src/basic-syntax/references-dangling.md:17 msgid "" "Rust is tracking the lifetimes of all references to ensure they live long " "enough." msgstr "" +"Rust відстежує терміни життя всіх посилань, щоб переконатися, що вони живуть " +"достатньо довго." #: src/basic-syntax/references-dangling.md:19 msgid "We will talk more about borrowing when we get to ownership." -msgstr "" +msgstr "Про запозичення ми поговоримо більше, коли дійдемо до власності." #: src/basic-syntax/slices.md:3 msgid "A slice gives you a view into a larger collection:" -msgstr "" +msgstr "Фрагмент дає змогу переглянути більшу колекцію:" #: src/basic-syntax/slices.md:5 msgid "" @@ -3045,17 +3206,20 @@ msgstr "" #: src/basic-syntax/slices.md:16 msgid "Slices borrow data from the sliced type." -msgstr "" +msgstr "Зрізи запозичують дані зі зрізаного типу." #: src/basic-syntax/slices.md:17 msgid "Question: What happens if you modify `a[3]` right before printing `s`?" msgstr "" +"Запитання: що станеться, якщо змінити `a[3]` безпосередньо перед друком `s`?" #: src/basic-syntax/slices.md:21 msgid "" "We create a slice by borrowing `a` and specifying the starting and ending " "indexes in brackets." msgstr "" +"Ми створюємо фрагмент, запозичуючи `a` та вказуючи початковий і кінцевий " +"індекси в дужках." #: src/basic-syntax/slices.md:23 msgid "" @@ -3063,17 +3227,24 @@ msgid "" "starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are " "identical." msgstr "" +"Якщо фрагмент починається з індексу 0, синтаксис діапазону Rust дозволяє нам " +"відкинути початковий індекс, тобто `&a[0..a.len()]` і `&a[..a.len()]` " +"ідентичні." #: src/basic-syntax/slices.md:25 msgid "" "The same is true for the last index, so `&a[2..a.len()]` and `&a[2..]` are " "identical." msgstr "" +"Те саме стосується останнього індексу, тому `&a[2..a.len()]` і `&a[2..]` " +"ідентичні." #: src/basic-syntax/slices.md:27 msgid "" "To easily create a slice of the full array, we can therefore use `&a[..]`." msgstr "" +"Щоб легко створити фрагмент повного масиву, ми можемо використовувати " +"`&a[..]`." #: src/basic-syntax/slices.md:29 msgid "" @@ -3081,12 +3252,18 @@ msgid "" "(`&[i32]`) no longer mentions the array length. This allows us to perform " "computation on slices of different sizes." msgstr "" +"`s` є посиланням на фрагмент `i32`s. Зверніть увагу, що тип `s` (`&[i32]`) " +"більше не згадує довжину масиву. Це дозволяє нам виконувати обчислення на " +"зрізах різного розміру." #: src/basic-syntax/slices.md:31 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 "" +"Зрізи завжди запозичуються з іншого об'єкта. У цьому прикладі \"a\" має " +"залишатися \"живим\" (в області видимості) принаймні стільки ж, скільки наш " +"фрагмент." #: src/basic-syntax/slices.md:33 msgid "" @@ -3097,14 +3274,20 @@ msgid "" "`println`, when the slice is no longer used. More details will be explained " "in the borrow checker section." msgstr "" +"Питання про модифікацію `a[3]` може викликати цікаву дискусію, але відповідь " +"полягає в тому, що з міркувань безпеки пам’яті ви не можете зробити це через " +"`a` на цьому етапі виконання, але ви можете читати дані з обох `a ` і `s` " +"безпечно. Він працює до того, як ви створили фрагмент, і знову після " +"`println`, коли фрагмент більше не використовується. Докладніше буде описано " +"в розділі перевірки запозичень." #: src/basic-syntax/string-slices.md:1 msgid "`String` vs `str`" -msgstr "" +msgstr "`String` проти `str`" #: src/basic-syntax/string-slices.md:3 msgid "We can now understand the two string types in Rust:" -msgstr "" +msgstr "Тепер ми можемо зрозуміти два типи рядків у Rust:" #: src/basic-syntax/string-slices.md:5 msgid "" @@ -3126,15 +3309,15 @@ msgstr "" #: src/basic-syntax/string-slices.md:20 msgid "Rust terminology:" -msgstr "" +msgstr "Термінологія Rust:" #: src/basic-syntax/string-slices.md:22 msgid "`&str` an immutable reference to a string slice." -msgstr "" +msgstr "`&str` незмінне посилання на фрагмент рядка." #: src/basic-syntax/string-slices.md:23 msgid "`String` a mutable string buffer." -msgstr "" +msgstr "`String` змінний буфер рядка." #: src/basic-syntax/string-slices.md:27 msgid "" @@ -3142,12 +3325,17 @@ msgid "" "encoded string data stored in a block of memory. String literals " "(`”Hello”`), are stored in the program’s binary." msgstr "" +"`&str` представляє фрагмент рядка, який є незмінним посиланням на дані рядка " +"в кодуванні UTF-8, що зберігаються в блоці пам’яті. Рядкові літерали " +"(`”Hello”`) зберігаються у двійковому файлі програми." #: src/basic-syntax/string-slices.md:30 msgid "" "Rust’s `String` type is a wrapper around a vector of bytes. As with a " "`Vec`, it is owned." msgstr "" +"Тип `String` Rust — це оболонка навколо вектора байтів. Як і у випадку з " +"`Vec`, він належить." #: src/basic-syntax/string-slices.md:32 msgid "" @@ -3161,12 +3349,16 @@ msgid "" "The `format!()` macro is a convenient way to generate an owned string from " "dynamic values. It accepts the same format specification as `println!()`." msgstr "" +"Макрос `format!()` — це зручний спосіб генерувати власний рядок із " +"динамічних значень. Він приймає ту саму специфікацію формату, що й `println!" +"()`." #: src/basic-syntax/string-slices.md:38 msgid "" "You can borrow `&str` slices from `String` via `&` and optionally range " "selection." msgstr "" +"Ви можете запозичити фрагменти `&str` з `String` через `&` і вибір діапазону." #: src/basic-syntax/string-slices.md:40 msgid "" @@ -3175,12 +3367,19 @@ msgid "" "equivalent of `std::string` from C++ (main difference: it can only contain " "UTF-8 encoded bytes and will never use a small-string optimization)." msgstr "" +"Для програмістів C++: думайте про `&str` як про `const char*` із C++, але " +"той, який завжди вказує на дійсний рядок у пам’яті. Rust `String` — це " +"приблизний еквівалент `std::string` з C++ (головна відмінність: він може " +"містити лише байти в кодуванні UTF-8 і ніколи не використовуватиме " +"оптимізацію за малими рядками)." #: src/basic-syntax/functions.md:3 msgid "" "A Rust version of the famous [FizzBuzz](https://en.wikipedia.org/wiki/" "Fizz_buzz) interview question:" msgstr "" +"Rust-версія відомого запитання для інтерв’ю [FizzBuzz](https://en.wikipedia." +"org/wiki/Fizz_buzz):" #: src/basic-syntax/functions.md:5 msgid "" @@ -3218,12 +3417,16 @@ msgid "" "We refer in `main` to a function written below. Neither forward declarations " "nor headers are necessary. " msgstr "" +"У `main` ми посилаємося на функцію, написану нижче. Ні попередні оголошення, " +"ні заголовки не потрібні." #: src/basic-syntax/functions.md:36 msgid "" "Declaration parameters are followed by a type (the reverse of some " "programming languages), then a return type." msgstr "" +"За параметрами оголошення слідує тип (зворотній зв’язок з деякими мовами " +"програмування), а потім тип повернення." #: src/basic-syntax/functions.md:37 msgid "" @@ -3236,17 +3439,24 @@ msgid "" "Some functions have no return value, and return the 'unit type', `()`. The " "compiler will infer this if the `-> ()` return type is omitted." msgstr "" +"Деякі функції не мають значення, що повертається, і повертають «тип одиниці " +"вимірювання», `()`. Компілятор визначить це, якщо тип повернення `-> ()` " +"пропущено." #: src/basic-syntax/functions.md:39 msgid "" "The range expression in the `for` loop in `print_fizzbuzz_to()` contains " "`=n`, which causes it to include the upper bound." msgstr "" +"Вираз діапазону в циклі `for` у `print_fizzbuzz_to()` містить `=n`, що " +"змушує його включати верхню межу." #: src/basic-syntax/rustdoc.md:3 msgid "" "All language items in Rust can be documented using special `///` syntax." msgstr "" +"Усі мовні елементи в Rust можна задокументувати за допомогою спеціального " +"синтаксису `///`." #: src/basic-syntax/rustdoc.md:5 msgid "" @@ -3272,24 +3482,35 @@ 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 "" +"Вміст розглядається як Markdown. Усі опубліковані ящики бібліотеки Rust " +"автоматично документуються на [`docs.rs`](https://docs.rs) за допомогою " +"[rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc) .html). " +"Ідіоматично документувати всі публічні елементи в API за допомогою цього " +"шаблону." #: src/basic-syntax/rustdoc.md:24 msgid "" "Show students the generated docs for the `rand` crate at [`docs.rs/rand`]" "(https://docs.rs/rand)." msgstr "" +"Покажіть студентам згенеровані документи для ящика `rand` на [`docs.rs/rand`]" +"(https://docs.rs/rand)." #: src/basic-syntax/rustdoc.md:27 msgid "" "This course does not include rustdoc on slides, just to save space, but in " "real code they should be present." msgstr "" +"Цей курс не містить rustdoc на слайдах, щоб заощадити місце, але в реальному " +"коді вони повинні бути присутніми." #: src/basic-syntax/rustdoc.md:30 msgid "" "Inner doc comments are discussed later (in the page on modules) and need not " "be addressed here." msgstr "" +"Коментарі до внутрішнього документа обговорюються пізніше (на сторінці " +"модулів), і їх тут не потрібно розглядати." #: src/basic-syntax/rustdoc.md:33 msgid "" @@ -3297,12 +3518,17 @@ msgid "" "`cargo test`. We will discuss these tests in the [Testing section](../" "testing/doc-tests.html)." msgstr "" +"Коментарі Rustdoc можуть містити фрагменти коду, які ми можемо запускати та " +"тестувати за допомогою `cargo test`. Ми обговоримо ці тести в [розділі " +"тестування](../testing/doc-tests.html)." #: src/basic-syntax/methods.md:3 msgid "" "Methods are functions associated with a type. The `self` argument of a " "method is an instance of the type it is associated with:" msgstr "" +"Методи — це функції, пов’язані з типом. Аргумент `self` методу є екземпляром " +"типу, з яким він пов’язаний:" #: src/basic-syntax/methods.md:6 msgid "" @@ -3336,10 +3562,13 @@ msgid "" "We will look much more at methods in today's exercise and in tomorrow's " "class." msgstr "" +"Ми розглянемо методи набагато більше в сьогоднішній вправі та на " +"завтрашньому уроці." #: src/basic-syntax/methods.md:34 msgid "Add a static method called `Rectangle::new` and call this from `main`:" msgstr "" +"Додайте статичний метод під назвою `Rectangle::new` і викличте це з `main`:" #: src/basic-syntax/methods.md:36 msgid "" @@ -3357,48 +3586,55 @@ msgid "" "constructor, `Rectangle { width, height }`, could be called directly. See " "the [Rustnomicon](https://doc.rust-lang.org/nomicon/constructors.html)." msgstr "" +"Хоча _технічно_, Rust не має спеціальних конструкторів, для ініціалізації " +"структур зазвичай використовуються статичні методи (але це не обов’язково). " +"Фактичний конструктор, `Rectangle { width, height }`, можна викликати " +"безпосередньо. Перегляньте [Rustnomicon](https://doc.rust-lang.org/nomicon/" +"constructors.html)." #: src/basic-syntax/methods.md:45 msgid "" "Add a `Rectangle::square(width: u32)` constructor to illustrate that such " "static methods can take arbitrary parameters." msgstr "" +"Додайте конструктор `Rectangle::square(width: u32)`, щоб проілюструвати, що " +"такі статичні методи можуть приймати довільні параметри." #: src/basic-syntax/functions-interlude.md:1 msgid "Function Overloading" -msgstr "" +msgstr "Перевантаження функцій" #: src/basic-syntax/functions-interlude.md:3 msgid "Overloading is not supported:" -msgstr "" +msgstr "Перевантаження не підтримується:" #: src/basic-syntax/functions-interlude.md:5 msgid "Each function has a single implementation:" -msgstr "" +msgstr "Кожна функція має одну реалізацію:" #: src/basic-syntax/functions-interlude.md:6 msgid "Always takes a fixed number of parameters." -msgstr "" +msgstr "Завжди приймає фіксовану кількість параметрів." #: src/basic-syntax/functions-interlude.md:7 msgid "Always takes a single set of parameter types." -msgstr "" +msgstr "Завжди приймає один набір типів параметрів." #: src/basic-syntax/functions-interlude.md:8 msgid "Default values are not supported:" -msgstr "" +msgstr "Значення за замовчуванням не підтримуються:" #: src/basic-syntax/functions-interlude.md:9 msgid "All call sites have the same number of arguments." -msgstr "" +msgstr "Усі сайти викликів мають однакову кількість аргументів." #: src/basic-syntax/functions-interlude.md:10 msgid "Macros are sometimes used as an alternative." -msgstr "" +msgstr "Макроси іноді використовуються як альтернатива." #: src/basic-syntax/functions-interlude.md:12 msgid "However, function parameters can be generic:" -msgstr "" +msgstr "Однак параметри функції можуть бути загальними:" #: src/basic-syntax/functions-interlude.md:14 msgid "" @@ -3420,26 +3656,29 @@ msgid "" "limited polymorphism on argument types. We will see more details in a later " "section." msgstr "" +"При використанні дженериків стандартна бібліотека `Into` може забезпечити " +"певний обмежений поліморфізм типів аргументів. Ми побачимо більше деталей у " +"наступному розділі." #: src/exercises/day-1/morning.md:1 msgid "Day 1: Morning Exercises" -msgstr "" +msgstr "День 1: Ранкова зарядка" #: src/exercises/day-1/morning.md:3 msgid "In these exercises, we will explore two parts of Rust:" -msgstr "" +msgstr "У цих вправах ми дослідимо дві частини Rust:" #: src/exercises/day-1/morning.md:5 msgid "Implicit conversions between types." -msgstr "" +msgstr "Неявні перетворення між типами." #: src/exercises/day-1/morning.md:7 msgid "Arrays and `for` loops." -msgstr "" +msgstr "Масиви та цикли for." #: src/exercises/day-1/morning.md:11 msgid "A few things to consider while solving the exercises:" -msgstr "" +msgstr "Кілька речей, які слід враховувати під час вирішення вправ:" #: src/exercises/day-1/morning.md:13 msgid "" @@ -3447,16 +3686,22 @@ msgid "" "completion in your editor. See the page about [Using Cargo](../../cargo.md) " "for details on installing Rust." msgstr "" +"Використовуйте локальну установку Rust, якщо можливо. Таким чином ви можете " +"отримати автозаповнення у своєму редакторі. Перегляньте сторінку про " +"[Використання Cargo](../../cargo.md), щоб дізнатися більше про встановлення " +"Rust." #: src/exercises/day-1/morning.md:17 msgid "Alternatively, use the Rust Playground." -msgstr "" +msgstr "Крім того, скористайтеся ігровим майданчиком Rust." #: src/exercises/day-1/morning.md:19 msgid "" "The code snippets are not editable on purpose: the inline code snippets lose " "their state if you navigate away from the page." msgstr "" +"Фрагменти коду не можна редагувати навмисно: вбудовані фрагменти коду " +"втрачають свій стан, якщо ви переходите зі сторінки." #: src/exercises/day-1/morning.md:22 src/exercises/day-2/morning.md:11 #: src/exercises/day-3/morning.md:9 src/exercises/bare-metal/morning.md:7 @@ -3465,6 +3710,8 @@ msgid "" "After looking at the exercises, you can look at the [solutions](solutions-" "morning.md) provided." msgstr "" +"Переглянувши вправи, ви можете переглянути надані [рішення](solutions-" +"morning.md)." #: src/exercises/day-1/implicit-conversions.md:3 msgid "" @@ -3472,6 +3719,9 @@ msgid "" "([unlike C++](https://en.cppreference.com/w/cpp/language/" "implicit_conversion)). You can see this in a program like this:" msgstr "" +"Rust не застосовуватиме автоматично _неявні перетворення_ між типами ([на " +"відміну від C++](https://en.cppreference.com/w/cpp/language/" +"implicit_conversion)). Ви можете побачити це в такій програмі:" #: src/exercises/day-1/implicit-conversions.md:6 msgid "" @@ -3498,6 +3748,12 @@ msgid "" "trait has a single `into()` method. Implementing these traits is how a type " "expresses that it can be converted into another type." msgstr "" +"Усі цілі типи Rust реалізують [`From`](https://doc.rust-lang.org/std/" +"convert/trait.From.html) і [`Into`](https: //doc.rust-lang.org/std/" +"convert/trait.Into.html), щоб ми могли конвертувати між ними. Характеристика " +"`From` має єдиний метод `from()`, а ознака `Into` має один метод " +"`into()`. Реалізація цих ознак є тим, як тип виражає, що його можна " +"перетворити на інший тип." #: src/exercises/day-1/implicit-conversions.md:25 msgid "" @@ -3507,6 +3763,10 @@ msgid "" "i16` implementation automatically create an implementation of `Into for " "i8`." msgstr "" +"Стандартна бібліотека має реалізацію `From для i16`, що означає, що ми " +"можемо перетворити змінну `x` типу `i8` на `i16`, викликавши `i16::from(x)`. " +"Або, простіше, з `x.into()`, оскільки реалізація `From для i16` " +"автоматично створює реалізацію `Into для i8`." #: src/exercises/day-1/implicit-conversions.md:30 msgid "" @@ -3514,14 +3774,18 @@ msgid "" "it is sufficient to only implement `From` to get a respective `Into` " "implementation automatically." msgstr "" +"Те саме стосується ваших власних реалізацій `From` для ваших власних типів, " +"тому достатньо реалізувати лише `From`, щоб автоматично отримати відповідну " +"реалізацію `Into`." #: src/exercises/day-1/implicit-conversions.md:33 msgid "Execute the above program and look at the compiler error." -msgstr "" +msgstr "Виконайте наведену вище програму та подивіться на помилку компілятора." #: src/exercises/day-1/implicit-conversions.md:35 msgid "Update the code above to use `into()` to do the conversion." msgstr "" +"Оновіть код вище, щоб використовувати `in()` для виконання перетворення." #: src/exercises/day-1/implicit-conversions.md:37 msgid "" @@ -3531,15 +3795,20 @@ msgid "" "[standard library documentation](https://doc.rust-lang.org/std/convert/trait." "From.html) to see if `From` is implemented for the pairs you check." msgstr "" +"Змініть типи `x` і `y` на інші речі (наприклад, `f32`, `bool`, `i128`), щоб " +"побачити, які типи можна перетворити на інші типи. Спробуйте перетворити " +"малі типи на великі типи і навпаки. Перевірте [стандартну бібліотечну " +"документацію](https://doc.rust-lang.org/std/convert/trait.From.html), щоб " +"перевірити, чи реалізовано `From` для пар, які ви перевіряєте." #: src/exercises/day-1/for-loops.md:1 #: src/exercises/day-1/solutions-morning.md:3 msgid "Arrays and `for` Loops" -msgstr "" +msgstr "Масиви та цикли for" #: src/exercises/day-1/for-loops.md:3 msgid "We saw that an array can be declared like this:" -msgstr "" +msgstr "Ми побачили, що масив можна оголосити так:" #: src/exercises/day-1/for-loops.md:5 msgid "" @@ -3553,6 +3822,8 @@ msgid "" "You can print such an array by asking for its debug representation with `{:?}" "`:" msgstr "" +"Ви можете надрукувати такий масив, запитавши його представлення налагодження " +"за допомогою `{:?}`:" #: src/exercises/day-1/for-loops.md:11 msgid "" @@ -3569,6 +3840,8 @@ msgid "" "Rust lets you iterate over things like arrays and ranges using the `for` " "keyword:" msgstr "" +"Rust дозволяє вам перебирати такі речі, як масиви та діапазони, " +"використовуючи ключове слово `for`:" #: src/exercises/day-1/for-loops.md:21 msgid "" @@ -3596,6 +3869,9 @@ msgid "" "and a function `transpose` which will transpose a matrix (turn rows into " "columns):" msgstr "" +"Використовуйте наведене вище, щоб написати функцію `pretty_print`, яка " +"красиво друкує матрицю, і функцію `transpose`, яка транспонує матрицю " +"(перетворює рядки на стовпці):" #: src/exercises/day-1/for-loops.md:41 msgid "" @@ -3608,13 +3884,15 @@ msgstr "" #: src/exercises/day-1/for-loops.md:47 msgid "Hard-code both functions to operate on 3 × 3 matrices." -msgstr "" +msgstr "Жорстко закодуйте обидві функції для роботи з матрицями 3 × 3." #: src/exercises/day-1/for-loops.md:49 msgid "" "Copy the code below to and implement the " "functions:" msgstr "" +"Скопіюйте наведений нижче код на і застосуйте " +"функції:" #: src/exercises/day-1/for-loops.md:52 msgid "" @@ -3649,7 +3927,7 @@ msgstr "" #: src/exercises/day-1/for-loops.md:80 msgid "Bonus Question" -msgstr "" +msgstr "Бонусне питання" #: src/exercises/day-1/for-loops.md:82 msgid "" @@ -3657,28 +3935,37 @@ msgid "" "argument and return types? Something like `&[&[i32]]` for a two-dimensional " "slice-of-slices. Why or why not?" msgstr "" +"Чи можете ви використати фрагменти `&[i32]` замість жорстко закодованих " +"матриць 3 × 3 для ваших аргументів і типів повернення? Щось на зразок " +"`&[&[i32]]` для двовимірного фрагмента фрагментів. Чому або чому ні?" #: src/exercises/day-1/for-loops.md:87 msgid "" "See the [`ndarray` crate](https://docs.rs/ndarray/) for a production quality " "implementation." msgstr "" +"Перегляньте [`ndarray` ящик](https://docs.rs/ndarray/), щоб дізнатися про " +"якість виробництва." #: src/exercises/day-1/for-loops.md:92 msgid "" "The solution and the answer to the bonus section are available in the " "[Solution](solutions-morning.md#arrays-and-for-loops) section." msgstr "" +"Рішення та відповідь до бонусного розділу доступні в розділі [Рішення]" +"(solutions-morning.md#arrays-and-for-loops)." #: src/exercises/day-1/for-loops.md:95 msgid "" "The use of the reference `&array` within `for n in &array` is a subtle " "preview of issues of ownership that will come later in the afternoon." msgstr "" +"Використання посилання `&array` у `for n in &array` є тонким попереднім " +"переглядом питань власності, які виникнуть пізніше вдень." #: src/exercises/day-1/for-loops.md:98 msgid "Without the `&`..." -msgstr "" +msgstr "Без `&`..." #: src/exercises/day-1/for-loops.md:99 msgid "" @@ -3686,6 +3973,8 @@ msgid "" "[introduced in the 2021 Edition](https://doc.rust-lang.org/edition-guide/" "rust-2021/IntoIterator-for-arrays.html)." msgstr "" +"Цикл мав би споживати масив. Це зміна [внесена у випуск 2021](https://doc." +"rust-lang.org/edition-guide/rust-2021/IntoIterator-for-arrays.html)." #: src/exercises/day-1/for-loops.md:102 msgid "" @@ -3700,12 +3989,18 @@ msgid "" "becomes the value of the `if` expression. Other control flow expressions " "work similarly in Rust." msgstr "" +"Як ми бачили, `if` є виразом у Rust. Він використовується для умовного " +"оцінювання одного з двох блоків, але блоки можуть мати значення, яке потім " +"стає значенням виразу if. Інші вирази потоку керування працюють подібним " +"чином у Rust." #: src/control-flow/blocks.md:3 msgid "" "A block in Rust contains a sequence of expressions. Each block has a value " "and a type, which are those of the last expression of the block:" msgstr "" +"Блок у Rust містить послідовність виразів. Кожен блок має значення та тип, " +"які відповідають останньому виразу блоку:" #: src/control-flow/blocks.md:7 msgid "" @@ -3740,6 +4035,8 @@ msgid "" "The same rule is used for functions: the value of the function body is the " "return value:" msgstr "" +"Те саме правило використовується для функцій: значення тіла функції є " +"значенням, що повертається:" #: src/control-flow/blocks.md:31 msgid "" @@ -3758,29 +4055,35 @@ msgstr "" #: src/pattern-matching.md:25 src/pattern-matching/match-guards.md:22 #: src/structs.md:31 src/methods.md:30 src/methods/example.md:46 msgid "Key Points:" -msgstr "" +msgstr "Ключові моменти:" #: src/control-flow/blocks.md:44 msgid "" "The point of this slide is to show that blocks have a type and value in " "Rust. " -msgstr "" +msgstr "Мета цього слайда — показати, що блоки мають тип і значення в Rust." #: src/control-flow/blocks.md:45 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 "" +"Ви можете показати, як змінюється значення блоку, змінивши останній рядок у " +"блоці. Наприклад, додавання/видалення крапки з комою або використання " +"`return`." #: src/control-flow/if-expressions.md:1 msgid "`if` expressions" -msgstr "" +msgstr "вирази `if`" #: src/control-flow/if-expressions.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 "" +"Ви використовуєте вирази [`if`](https://doc.rust-lang.org/reference/" +"expressions/if-expr.html#if-expressions) так само, як і вирази `if` в інших " +"мовах:" #: src/control-flow/if-expressions.md:7 msgid "" @@ -3801,6 +4104,8 @@ msgid "" "In addition, you can use `if` as an expression. The last expression of each " "block becomes the value of the `if` expression:" msgstr "" +"Крім того, ви можете використовувати `if` як вираз. Останній вираз кожного " +"блоку стає значенням виразу if:" #: src/control-flow/if-expressions.md:22 msgid "" @@ -3825,7 +4130,7 @@ msgstr "" #: src/control-flow/for-expressions.md:1 msgid "`for` loops" -msgstr "" +msgstr "петлі `за`" #: src/control-flow/for-expressions.md:3 msgid "" @@ -3833,6 +4138,9 @@ msgid "" "related to the [`while let` loop](while-let-expressions.md). It will " "automatically call `into_iter()` on the expression and then iterate over it:" msgstr "" +"Цикл [`for`] (https://doc.rust-lang.org/std/keyword.for.html) тісно " +"пов’язаний із циклом [`while let`] (while-let-expressions.md). Він " +"автоматично викличе `into_iter()` для виразу, а потім перебере його:" #: src/control-flow/for-expressions.md:7 msgid "" @@ -3853,37 +4161,44 @@ msgstr "" #: src/control-flow/for-expressions.md:21 msgid "You can use `break` and `continue` here as usual." -msgstr "" +msgstr "Ви можете використовувати `break` і `continue` тут, як зазвичай." #: src/control-flow/for-expressions.md:25 msgid "Index iteration is not a special syntax in Rust for just that case." msgstr "" +"Ітерація індексу не є спеціальним синтаксисом у Rust лише для цього випадку." #: src/control-flow/for-expressions.md:26 msgid "`(0..10)` is a range that implements an `Iterator` trait. " -msgstr "" +msgstr "\"(0..10)\" – це діапазон, який реалізує ознаку \"ітератора\"." #: src/control-flow/for-expressions.md:27 msgid "" "`step_by` is a method that returns another `Iterator` that skips every other " "element. " msgstr "" +"`step_by` — це метод, який повертає ще один `ітератор`, який пропускає всі " +"інші елементи." #: src/control-flow/for-expressions.md:28 msgid "" "Modify the elements in the vector and explain the compiler errors. Change " "vector `v` to be mutable and the for loop to `for x in v.iter_mut()`." msgstr "" +"Змініть елементи у векторі та поясніть помилки компілятора. Змініть вектор " +"`v` на змінний, а цикл for — на `for x у v.iter_mut()`." #: src/control-flow/while-expressions.md:1 msgid "`while` loops" -msgstr "" +msgstr "цикли `while`" #: src/control-flow/while-expressions.md:3 msgid "" "The [`while` keyword](https://doc.rust-lang.org/reference/expressions/loop-" "expr.html#predicate-loops) works very similar to other languages:" msgstr "" +"Ключове слово [`while`](https://doc.rust-lang.org/reference/expressions/loop-" +"expr.html#predicate-loops) працює дуже подібно до інших мов:" #: src/control-flow/while-expressions.md:6 msgid "" @@ -3904,25 +4219,32 @@ msgstr "" #: src/control-flow/break-continue.md:1 msgid "`break` and `continue`" -msgstr "" +msgstr "`break` і `continue`" #: src/control-flow/break-continue.md:3 msgid "" "If you want to exit a loop early, use [`break`](https://doc.rust-lang.org/" "reference/expressions/loop-expr.html#break-expressions)," msgstr "" +"Якщо ви хочете вийти з циклу раніше, використовуйте [`break`](https://doc." +"rust-lang.org/reference/expressions/loop-expr.html#break-expressions)," #: src/control-flow/break-continue.md:4 msgid "" "If you want to immediately start the next iteration use [`continue`](https://" "doc.rust-lang.org/reference/expressions/loop-expr.html#continue-expressions)." msgstr "" +"Якщо ви хочете негайно почати наступну ітерацію, використовуйте " +"[`продовжити`](https://doc.rust-lang.org/reference/expressions/loop-expr." +"html#continue-expressions)." #: src/control-flow/break-continue.md:7 msgid "" "Both `continue` and `break` can optionally take a label argument which is " "used to break out of nested loops:" msgstr "" +"І `continue`, і `break` можуть додатково приймати аргумент мітки, який " +"використовується для виходу з вкладених циклів:" #: src/control-flow/break-continue.md:10 msgid "" @@ -3949,20 +4271,24 @@ msgstr "" msgid "" "In this case we break the outer loop after 3 iterations of the inner loop." msgstr "" +"У цьому випадку ми розриваємо зовнішній цикл після 3 ітерацій внутрішнього " +"циклу." #: src/control-flow/loop-expressions.md:1 msgid "`loop` expressions" -msgstr "" +msgstr "вирази `циклу`" #: src/control-flow/loop-expressions.md:3 msgid "" "Finally, there is a [`loop` keyword](https://doc.rust-lang.org/reference/" "expressions/loop-expr.html#infinite-loops) which creates an endless loop." msgstr "" +"Нарешті, є [`loop` ключове слово](https://doc.rust-lang.org/reference/" +"expressions/loop-expr.html#infinite-loops), яке створює нескінченний цикл." #: src/control-flow/loop-expressions.md:6 msgid "Here you must either `break` or `return` to stop the loop:" -msgstr "" +msgstr "Тут ви повинні або `break`, або `return`, щоб зупинити цикл:" #: src/control-flow/loop-expressions.md:8 msgid "" @@ -3987,6 +4313,7 @@ msgstr "" #: src/control-flow/loop-expressions.md:27 msgid "Break the `loop` with a value (e.g. `break 8`) and print it out." msgstr "" +"Розірвіть «цикл» зі значенням (наприклад, «break 8») і роздрукуйте його." #: src/control-flow/loop-expressions.md:28 msgid "" @@ -3994,12 +4321,17 @@ msgid "" "value. This is because it's guaranteed to be entered at least once (unlike " "`while` and `for` loops)." msgstr "" +"Зауважте, що `loop` — це єдина конструкція циклу, яка повертає нетривіальне " +"значення. Це тому, що його гарантовано буде введено принаймні один раз (на " +"відміну від циклів `while` і `for`)." #: src/basic-syntax/variables.md:3 msgid "" "Rust provides type safety via static typing. Variable bindings are immutable " "by default:" msgstr "" +"Rust забезпечує безпеку типів за допомогою статичної типізації. Прив'язки " +"змінних незмінні за замовчуванням:" #: src/basic-syntax/variables.md:6 msgid "" @@ -4018,10 +4350,12 @@ msgid "" "Due to type inference the `i32` is optional. We will gradually show the " "types less and less as the course progresses." msgstr "" +"Через визначення типу `i32` є необов'язковим. Ми поступово показуватимемо " +"типи все рідше в міру просування курсу." #: src/basic-syntax/type-inference.md:3 msgid "Rust will look at how the variable is _used_ to determine the type:" -msgstr "" +msgstr "Rust перевірить, як _використовується_ змінна для визначення типу:" #: src/basic-syntax/type-inference.md:5 msgid "" @@ -4050,6 +4384,8 @@ msgid "" "This slide demonstrates how the Rust compiler infers types based on " "constraints given by variable declarations and usages." msgstr "" +"На цьому слайді показано, як компілятор Rust виводить типи на основі " +"обмежень, заданих оголошеннями змінних і використанням." #: src/basic-syntax/type-inference.md:28 msgid "" @@ -4059,6 +4395,11 @@ msgid "" "of a type. The compiler does the job for us and helps us write more concise " "code." msgstr "" +"Дуже важливо підкреслити, що змінні, оголошені таким чином, не належать до " +"якогось динамічного «будь-якого типу», який може містити будь-які дані. " +"Машинний код, згенерований такою декларацією, ідентичний явному оголошенню " +"типу. Компілятор виконує роботу за нас і допомагає нам писати більш стислий " +"код." #: src/basic-syntax/type-inference.md:32 msgid "" @@ -4066,6 +4407,9 @@ msgid "" "container without the code ever explicitly specifying the contained type, " "using `_` as a placeholder:" msgstr "" +"Наведений нижче код повідомляє компілятору скопіювати в певний загальний " +"контейнер без явного вказівки коду типу, що міститься, використовуючи `_` як " +"заповнювач:" #: src/basic-syntax/type-inference.md:34 msgid "" @@ -4090,10 +4434,15 @@ msgid "" "org/std/collections/struct.HashSet.html#impl-FromIterator%3CT%3E-for-" "HashSet%3CT,+S%3E) implements." msgstr "" +"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator." +"html#method.collect) покладається на [`FromIterator`](https://doc.rust- lang." +"org/std/iter/trait.FromIterator.html), який [`HashSet`](https://doc.rust-" +"lang.org/std/collections/struct.HashSet.html#impl-FromIterator%3CT% 3E-for-" +"HashSet%3CT,+S%3E)." #: src/basic-syntax/static-and-const.md:1 msgid "Static and Constant Variables" -msgstr "" +msgstr "Статичні та постійні змінні" #: src/basic-syntax/static-and-const.md:3 msgid "" @@ -4101,16 +4450,21 @@ msgid "" "scoped values that cannot be moved or reallocated during the execution of " "the program. " msgstr "" +"Статичні та постійні змінні — це два різні способи створення глобальних " +"значень, які не можна перемістити чи перерозподілити під час виконання " +"програми." #: src/basic-syntax/static-and-const.md:6 msgid "`const`" -msgstr "" +msgstr "`const`" #: src/basic-syntax/static-and-const.md:8 msgid "" "Constant variables are evaluated at compile time and their values are " "inlined wherever they are used:" msgstr "" +"Константні змінні оцінюються під час компіляції, а їхні значення " +"вставляються скрізь, де вони використовуються:" #: src/basic-syntax/static-and-const.md:11 msgid "" @@ -4139,22 +4493,29 @@ msgid "" "According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-" "vs-static.html) these are inlined upon use." msgstr "" +"Відповідно до [Книги RFC RFC] (https://rust-lang.github.io/rfcs/0246-const-" +"vs-static.html) вони додаються під час використання." #: src/basic-syntax/static-and-const.md:31 msgid "" "Only functions marked `const` can be called at compile time to generate " "`const` values. `const` functions can however be called at runtime." msgstr "" +"Лише функції з позначкою `const` можна викликати під час компіляції для " +"створення значень `const`. Однак функції `const` можна викликати під час " +"виконання." #: src/basic-syntax/static-and-const.md:33 msgid "`static`" -msgstr "" +msgstr "`статичний`" #: src/basic-syntax/static-and-const.md:35 msgid "" "Static variables will live during the whole execution of the program, and " "therefore will not move:" msgstr "" +"Статичні змінні будуть жити протягом усього виконання програми, тому не " +"будуть переміщатися:" #: src/basic-syntax/static-and-const.md:37 msgid "" @@ -4176,6 +4537,12 @@ msgid "" "globally-scoped value does not have a reason to need object identity, " "`const` is generally preferred." msgstr "" +"Як зазначено в [Книзі Rust RFC](https://rust-lang.github.io/rfcs/0246-const-" +"vs-static.html), вони не вбудовуються під час використання та мають фактичне " +"пов’язане розташування в пам’яті. Це корисно для небезпечного та вбудованого " +"коду, і змінна живе протягом усього виконання програми. Якщо значення " +"глобальної області видимості не потребує ідентичності об’єкта, перевага " +"надається `const`." #: src/basic-syntax/static-and-const.md:49 msgid "" @@ -4186,99 +4553,114 @@ msgid "" "access to them requires `unsafe` code. We will look at [mutable statics](../" "unsafe/mutable-static-variables.md) in the chapter on Unsafe Rust." msgstr "" +"Оскільки `static` змінні доступні з будь-якого потоку, вони повинні бути " +"`Sync`. Внутрішня змінність можлива через [`Mutex`](https://doc.rust-lang." +"org/std/sync/struct.Mutex.html), атомарний або подібний. Також можна мати " +"змінну статику, але вона потребує ручної синхронізації, тому будь-який " +"доступ до них потребує `небезпечного` коду. Ми розглянемо [змінну статику]" +"(../unsafe/mutable-static-variables.md) у розділі про небезпечний Rust." #: src/basic-syntax/static-and-const.md:57 msgid "Mention that `const` behaves semantically similar to C++'s `constexpr`." -msgstr "" +msgstr "Зауважте, що `const` поводиться семантично подібно до `constexpr` C++." #: src/basic-syntax/static-and-const.md:58 msgid "" "`static`, on the other hand, is much more similar to a `const` or mutable " "global variable in C++." msgstr "" +"`static`, з іншого боку, набагато більше схожий на `const` або змінну " +"глобальну змінну в C++." #: src/basic-syntax/static-and-const.md:59 msgid "" "`static` provides object identity: an address in memory and state as " "required by types with interior mutability such as `Mutex`." msgstr "" +"`static` забезпечує ідентичність об’єкта: адресу в пам’яті та стан " +"відповідно до типів із внутрішньою змінністю, таких як `Mutex`." #: src/basic-syntax/static-and-const.md:60 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 "" +"Це не надто поширене явище, коли потрібна константа з оцінкою часу " +"виконання, але це корисно та безпечніше, ніж використовувати static." #: src/basic-syntax/static-and-const.md:61 msgid "`thread_local` data can be created with the macro `std::thread_local`." msgstr "" +"Дані `thread_local` можна створити за допомогою макросу `std::thread_local`." #: src/basic-syntax/static-and-const.md:63 msgid "Properties table:" -msgstr "" +msgstr "Таблиця властивостей:" #: src/basic-syntax/static-and-const.md:65 msgid "Property" -msgstr "" +msgstr "Власність" #: src/basic-syntax/static-and-const.md:65 msgid "Static" -msgstr "" +msgstr "Статичний" #: src/basic-syntax/static-and-const.md:65 msgid "Constant" -msgstr "" +msgstr "Постійний" #: src/basic-syntax/static-and-const.md:67 msgid "Has an address in memory" -msgstr "" +msgstr "Має адресу в пам'яті" #: src/basic-syntax/static-and-const.md:67 #: src/basic-syntax/static-and-const.md:68 #: src/basic-syntax/static-and-const.md:70 #: src/basic-syntax/static-and-const.md:71 msgid "Yes" -msgstr "" +msgstr "Так" #: src/basic-syntax/static-and-const.md:67 msgid "No (inlined)" -msgstr "" +msgstr "Ні (вставлено)" #: src/basic-syntax/static-and-const.md:68 msgid "Lives for the entire duration of the program" -msgstr "" +msgstr "Живе протягом усього терміну програми" #: src/basic-syntax/static-and-const.md:68 #: src/basic-syntax/static-and-const.md:69 #: src/basic-syntax/static-and-const.md:71 msgid "No" -msgstr "" +msgstr "Немає" #: src/basic-syntax/static-and-const.md:69 msgid "Can be mutable" -msgstr "" +msgstr "Може бути змінним" #: src/basic-syntax/static-and-const.md:69 msgid "Yes (unsafe)" -msgstr "" +msgstr "Так (небезпечно)" #: src/basic-syntax/static-and-const.md:70 msgid "Evaluated at compile time" -msgstr "" +msgstr "Оцінюється під час компіляції" #: src/basic-syntax/static-and-const.md:70 msgid "Yes (initialised at compile time)" -msgstr "" +msgstr "Так (ініціалізовано під час компіляції)" #: src/basic-syntax/static-and-const.md:71 msgid "Inlined wherever it is used" -msgstr "" +msgstr "Вбудований скрізь, де він використовується" #: src/basic-syntax/scopes-shadowing.md:3 msgid "" "You can shadow variables, both those from outer scopes and variables from " "the same scope:" msgstr "" +"Ви можете затіняти змінні, як із зовнішніх областей, так і змінні з тієї ж " +"області:" #: src/basic-syntax/scopes-shadowing.md:6 msgid "" @@ -4306,16 +4688,21 @@ msgid "" "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 "" +"Визначення: затінення відрізняється від мутації, оскільки після затінення " +"обидві області пам’яті змінної існують одночасно. Обидва доступні під " +"однаковою назвою, залежно від того, де ви її використовуєте в коді." #: src/basic-syntax/scopes-shadowing.md:26 msgid "A shadowing variable can have a different type. " -msgstr "" +msgstr "Змінна затінення може мати інший тип." #: src/basic-syntax/scopes-shadowing.md:27 msgid "" "Shadowing looks obscure at first, but is convenient for holding on to values " "after `.unwrap()`." msgstr "" +"Затінення спочатку виглядає незрозумілим, але зручно для збереження значень " +"після `.unwrap()`." #: src/basic-syntax/scopes-shadowing.md:28 msgid "" @@ -4323,6 +4710,9 @@ msgid "" "locations when shadowing an immutable variable in a scope, even if the type " "does not change." msgstr "" +"Наступний код демонструє, чому компілятор не може просто повторно " +"використовувати розташування пам’яті під час затінення незмінної змінної в " +"області, навіть якщо тип не змінюється." #: src/basic-syntax/scopes-shadowing.md:30 msgid "" @@ -4341,6 +4731,7 @@ msgid "" "The `enum` keyword allows the creation of a type which has a few different " "variants:" msgstr "" +"Ключове слово `enum` дозволяє створити тип, який має кілька різних варіантів:" #: src/enums.md:6 msgid "" @@ -4373,27 +4764,32 @@ msgstr "" #: src/enums.md:36 msgid "Enumerations allow you to collect a set of values under one type" -msgstr "" +msgstr "Перерахування дозволяють зібрати набір значень під один тип" #: src/enums.md:37 msgid "" "This page offers an enum type `CoinFlip` with two variants `Heads` and " "`Tails`. You might note the namespace when using variants." msgstr "" +"Ця сторінка пропонує тип переліку `CoinFlip` з двома варіантами `Heads` і " +"`Tails`. Ви можете звернути увагу на простір імен під час використання " +"варіантів." #: src/enums.md:38 msgid "This might be a good time to compare Structs and Enums:" -msgstr "" +msgstr "Це може бути гарний час для порівняння Structs і Enum:" #: src/enums.md:39 msgid "" "In both, you can have a simple version without fields (unit struct) or one " "with different types of fields (variant payloads). " msgstr "" +"В обох ви можете мати просту версію без полів (структура одиниць) або з " +"різними типами полів (варіантні корисні навантаження)." #: src/enums.md:40 msgid "In both, associated functions are defined within an `impl` block." -msgstr "" +msgstr "В обох асоційовані функції визначені в блоці `impl`." #: src/enums.md:41 msgid "" @@ -4401,12 +4797,17 @@ msgid "" "structs but then they wouldn’t be the same type as they would if they were " "all defined in an enum. " msgstr "" +"Ви навіть можете реалізувати різні варіанти enum за допомогою окремих " +"структур, але тоді вони не будуть того самого типу, якби вони були визначені " +"в enum." #: src/enums/variant-payloads.md:3 msgid "" "You can define richer enums where the variants carry data. You can then use " "the `match` statement to extract the data from each variant:" msgstr "" +"Ви можете визначити більш багаті переліки, де варіанти несуть дані. Потім ви " +"можете використати оператор `match`, щоб отримати дані з кожного варіанту:" #: src/enums/variant-payloads.md:6 msgid "" @@ -4444,46 +4845,59 @@ msgid "" "matched. The pattern binds references to the fields in the \"match arm\" " "after the `=>`." msgstr "" +"Доступ до значень у варіантах переліку можна отримати лише після " +"відповідності шаблону. Шаблон прив’язує посилання до полів у «руці " +"відповідності» після `=>`." #: src/enums/variant-payloads.md:36 msgid "" "The expression is matched against the patterns from top to bottom. There is " "no fall-through like in C or C++." msgstr "" +"Вираз зіставляється із шаблонами зверху вниз. Немає провалів, як у C або C++." #: src/enums/variant-payloads.md:37 msgid "" "The match expression has a value. The value is the last expression in the " "match arm which was executed." msgstr "" +"Вираз відповідності має значення. Значення — це останній вираз у групі " +"відповідності, який було виконано." #: src/enums/variant-payloads.md:38 msgid "" "Starting from the top we look for what pattern matches the value then run " "the code following the arrow. Once we find a match, we stop. " msgstr "" +"Починаючи згори, ми шукаємо, який шаблон відповідає значенню, а потім " +"запускаємо код за стрілкою. Коли ми знаходимо збіг, ми зупиняємось." #: src/enums/variant-payloads.md:39 msgid "" "Demonstrate what happens when the search is inexhaustive. Note the advantage " "the Rust compiler provides by confirming when all cases are handled. " msgstr "" +"Продемонструйте, що відбувається, коли пошук є невичерпним. Зверніть увагу " +"на перевагу, яку надає компілятор Rust, підтверджуючи, коли всі випадки " +"оброблено." #: src/enums/variant-payloads.md:40 msgid "`match` inspects a hidden discriminant field in the `enum`." -msgstr "" +msgstr "`match` перевіряє приховане дискримінантне поле в `enum`." #: src/enums/variant-payloads.md:41 msgid "" "It is possible to retrieve the discriminant by calling `std::mem::" "discriminant()`" -msgstr "" +msgstr "Можна отримати дискримінант, викликавши `std::mem::discriminant()`" #: src/enums/variant-payloads.md:42 msgid "" "This is useful, for example, if implementing `PartialEq` for structs where " "comparing field values doesn't affect equality." msgstr "" +"Це корисно, наприклад, якщо реалізовано `PartialEq` для структур, де " +"порівняння значень полів не впливає на рівність." #: src/enums/variant-payloads.md:43 msgid "" @@ -4491,12 +4905,16 @@ msgid "" "Click(Click)` with a top level `struct Click { ... }`. The inlined version " "cannot implement traits, for example." msgstr "" +"`WebEvent::Click { ... }` не зовсім те саме, що `WebEvent::Click(Click)` з " +"верхньою структурою `struct Click { ... }`. Вбудована версія не може " +"реалізувати ознаки, наприклад." #: src/enums/sizes.md:3 msgid "" "Rust enums are packed tightly, taking constraints due to alignment into " "account:" msgstr "" +"Переліки Rust упаковані щільно, враховуючи обмеження через вирівнювання:" #: src/enums/sizes.md:5 msgid "" @@ -4525,17 +4943,22 @@ msgid "" "See the [Rust Reference](https://doc.rust-lang.org/reference/type-layout." "html)." msgstr "" +"Перегляньте [довідник Rust](https://doc.rust-lang.org/reference/type-layout." +"html)." #: src/enums/sizes.md:30 msgid "" "Internally Rust is using a field (discriminant) to keep track of the enum " "variant." msgstr "" +"Внутрішньо Rust використовує поле (дискримінант), щоб відстежувати варіант " +"переліку." #: src/enums/sizes.md:32 msgid "" "You can control the discriminant if needed (e.g., for compatibility with C):" msgstr "" +"За потреби можна керувати дискримінантом (наприклад, для сумісності з C):" #: src/enums/sizes.md:34 msgid "" @@ -4560,36 +4983,44 @@ msgid "" "Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 " "bytes." msgstr "" +"Без `repr` тип дискримінанта займає 2 байти, оскільки 10001 вміщує 2 байти." #: src/enums/sizes.md:53 msgid "Try out other types such as" -msgstr "" +msgstr "Спробуйте інші типи, наприклад" #: src/enums/sizes.md:55 msgid "`dbg_size!(bool)`: size 1 bytes, align: 1 bytes," -msgstr "" +msgstr "`dbg_size!(bool)`: розмір 1 байт, вирівнювання: 1 байт," #: src/enums/sizes.md:56 msgid "" "`dbg_size!(Option)`: size 1 bytes, align: 1 bytes (niche optimization, " "see below)," msgstr "" +"`dbg_size!(Option)`: розмір 1 байт, вирівнювання: 1 байт (оптимізація " +"ніші, див. нижче)," #: src/enums/sizes.md:57 msgid "`dbg_size!(&i32)`: size 8 bytes, align: 8 bytes (on a 64-bit machine)," msgstr "" +"`dbg_size!(&i32)`: розмір 8 байт, вирівнювання: 8 байт (на 64-бітній машині)," #: src/enums/sizes.md:58 msgid "" "`dbg_size!(Option<&i32>)`: size 8 bytes, align: 8 bytes (null pointer " "optimization, see below)." msgstr "" +"`dbg_size!(Option<&i32>)`: розмір 8 байтів, вирівнювання: 8 байтів " +"(оптимізація нульового вказівника, див. нижче)." #: src/enums/sizes.md:60 msgid "" "Niche optimization: Rust will merge unused bit patterns for the enum " "discriminant." msgstr "" +"Оптимізація ніші: Rust об’єднає невикористані шаблони бітів для " +"дискримінанта enum." #: src/enums/sizes.md:63 msgid "" @@ -4597,6 +5028,9 @@ msgid "" "option/#representation), Rust guarantees that `size_of::()` equals " "`size_of::>()`." msgstr "" +"Оптимізація нульового покажчика: для [деяких типів](https://doc.rust-lang." +"org/std/option/#representation) Rust гарантує, що `size_of::()` дорівнює " +"`size_of::