msgid ""
msgstr ""
"Project-Id-Version: Comprehensive Rust 🦀\n"
"POT-Creation-Date: 2023-09-11\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es\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"
#: src/SUMMARY.md:4 src/index.md:1
msgid "Welcome to Comprehensive Rust 🦀"
msgstr "Te damos la bienvenida a Comprehensive Rust 🦀"
#: src/SUMMARY.md:5 src/running-the-course.md:1
msgid "Running the Course"
msgstr "Desarrollo del curso"
#: src/SUMMARY.md:6 src/running-the-course/course-structure.md:1
msgid "Course Structure"
msgstr "Estructura del curso"
#: src/SUMMARY.md:7 src/running-the-course/keyboard-shortcuts.md:1
msgid "Keyboard Shortcuts"
msgstr "Combinaciones de teclas"
#: src/SUMMARY.md:8 src/running-the-course/translations.md:1
msgid "Translations"
msgstr "Traducciones"
#: src/SUMMARY.md:9 src/cargo.md:1
msgid "Using Cargo"
msgstr "Usando Cargo"
#: src/SUMMARY.md:10
msgid "Rust Ecosystem"
msgstr "Ecosistema Rust"
#: src/SUMMARY.md:11
msgid "Code Samples"
msgstr "Ejemplos de Código"
#: src/SUMMARY.md:12
msgid "Running Cargo Locally"
msgstr "Ejecutar Cargo a nivel local"
#: src/SUMMARY.md:15
msgid "Day 1: Morning"
msgstr "Día 1: mañana"
#: src/SUMMARY.md:19 src/SUMMARY.md:79 src/SUMMARY.md:134 src/SUMMARY.md:192
#: src/SUMMARY.md:218 src/SUMMARY.md:268
msgid "Welcome"
msgstr "Te damos la bienvenida"
#: src/SUMMARY.md:20 src/welcome-day-1/what-is-rust.md:1
msgid "What is Rust?"
msgstr "¿Qué es Rust?"
#: src/SUMMARY.md:21 src/hello-world.md:1
msgid "Hello World!"
msgstr "¡Hola, mundo!"
#: src/SUMMARY.md:22 src/hello-world/small-example.md:1
msgid "Small Example"
msgstr "Pequeño ejemplo"
#: src/SUMMARY.md:23 src/why-rust.md:1
msgid "Why Rust?"
msgstr "¿Por qué Rust?"
#: src/SUMMARY.md:24 src/why-rust/compile-time.md:1
msgid "Compile Time Guarantees"
msgstr "Garantías en Tiempo de Compilación"
#: src/SUMMARY.md:25 src/why-rust/runtime.md:1
msgid "Runtime Guarantees"
msgstr "Garantías en Runtime (Tiempo de Ejecución)"
#: src/SUMMARY.md:26 src/why-rust/modern.md:1
msgid "Modern Features"
msgstr "Funcionalidades Modernas"
#: src/SUMMARY.md:27 src/basic-syntax.md:1
msgid "Basic Syntax"
msgstr "Sintaxis básica"
#: src/SUMMARY.md:28 src/basic-syntax/scalar-types.md:1
msgid "Scalar Types"
msgstr "Tipos escalares"
#: src/SUMMARY.md:29 src/basic-syntax/compound-types.md:1
msgid "Compound Types"
msgstr "Tipos compuestos"
#: src/SUMMARY.md:30 src/basic-syntax/references.md:1
msgid "References"
msgstr "Referencias"
#: src/SUMMARY.md:31 src/basic-syntax/references-dangling.md:1
msgid "Dangling References"
msgstr "Referencias colgantes"
#: src/SUMMARY.md:32 src/basic-syntax/slices.md:1
msgid "Slices"
msgstr "Slices"
#: src/SUMMARY.md:33
msgid "String vs str"
msgstr "String o str"
#: src/SUMMARY.md:34 src/basic-syntax/functions.md:1
msgid "Functions"
msgstr "Funciones"
#: src/SUMMARY.md:35 src/basic-syntax/rustdoc.md:1
msgid "Rustdoc"
msgstr "Rustdoc"
#: src/SUMMARY.md:36 src/SUMMARY.md:102 src/basic-syntax/methods.md:1
#: src/methods.md:1
msgid "Methods"
msgstr "Métodos"
#: src/SUMMARY.md:37
msgid "Overloading"
msgstr "Sobrecarga"
#: src/SUMMARY.md:38 src/SUMMARY.md:71 src/SUMMARY.md:105 src/SUMMARY.md:125
#: src/SUMMARY.md:154 src/SUMMARY.md:184 src/SUMMARY.md:211 src/SUMMARY.md:232
#: src/SUMMARY.md:260 src/SUMMARY.md:282 src/SUMMARY.md:303
#: src/exercises/android/morning.md:1 src/exercises/bare-metal/morning.md:1
#: src/exercises/bare-metal/afternoon.md:1
#: src/exercises/concurrency/morning.md:1
#: src/exercises/concurrency/afternoon.md:1
msgid "Exercises"
msgstr "Ejercicios"
#: src/SUMMARY.md:39 src/exercises/day-1/implicit-conversions.md:1
msgid "Implicit Conversions"
msgstr "Conversiones Implícitas"
#: src/SUMMARY.md:40
msgid "Arrays and for Loops"
msgstr "Arrays y Loops for"
#: src/SUMMARY.md:42
msgid "Day 1: Afternoon"
msgstr "Día 1: Tarde"
#: src/SUMMARY.md:44 src/SUMMARY.md:295 src/control-flow.md:1
msgid "Control Flow"
msgstr "Control de Flujo"
#: src/SUMMARY.md:45 src/control-flow/blocks.md:1
msgid "Blocks"
msgstr "Bloques"
#: src/SUMMARY.md:46
msgid "if expressions"
msgstr "expresiones if"
#: src/SUMMARY.md:47
msgid "for expressions"
msgstr "expresiones for"
#: src/SUMMARY.md:48
msgid "while expressions"
msgstr "expresiones while"
#: src/SUMMARY.md:49
msgid "break & continue"
msgstr "break y continue"
#: src/SUMMARY.md:50
msgid "loop expressions"
msgstr "Expresiones loop"
#: src/SUMMARY.md:52 src/basic-syntax/variables.md:1
msgid "Variables"
msgstr "Variables"
#: src/SUMMARY.md:53 src/basic-syntax/type-inference.md:1
msgid "Type Inference"
msgstr "Inferencia de tipos"
#: src/SUMMARY.md:54
msgid "static & const"
msgstr "static y const"
#: src/SUMMARY.md:55 src/basic-syntax/scopes-shadowing.md:1
msgid "Scopes and Shadowing"
msgstr "Ámbitos y _Shadowing_"
#: src/SUMMARY.md:56 src/enums.md:1
msgid "Enums"
msgstr ""
#: src/SUMMARY.md:57 src/enums/variant-payloads.md:1
msgid "Variant Payloads"
msgstr "Payloads Variantes"
#: src/SUMMARY.md:58 src/enums/sizes.md:1
msgid "Enum Sizes"
msgstr "Tamaños de Enum"
#: src/SUMMARY.md:60 src/control-flow/novel.md:1
#, fuzzy
msgid "Novel Control Flow"
msgstr "Control de Flujo"
#: src/SUMMARY.md:61
msgid "if let expressions"
msgstr "expresiones if let"
#: src/SUMMARY.md:62
msgid "while let expressions"
msgstr "expresiones while let"
#: src/SUMMARY.md:63
msgid "match expressions"
msgstr "expresiones match"
#: src/SUMMARY.md:65 src/pattern-matching.md:1
msgid "Pattern Matching"
msgstr "Correspondencia de Patrones"
#: src/SUMMARY.md:66 src/pattern-matching/destructuring-enums.md:1
msgid "Destructuring Enums"
msgstr "Desestructurando Enums"
#: src/SUMMARY.md:67 src/pattern-matching/destructuring-structs.md:1
msgid "Destructuring Structs"
msgstr "Desestructurando Structs"
#: src/SUMMARY.md:68 src/pattern-matching/destructuring-arrays.md:1
msgid "Destructuring Arrays"
msgstr "Desestructurando Arrays"
#: src/SUMMARY.md:69 src/pattern-matching/match-guards.md:1
msgid "Match Guards"
msgstr "Guardas de Match"
#: src/SUMMARY.md:72 src/exercises/day-1/luhn.md:1
#: src/exercises/day-1/solutions-afternoon.md:3
msgid "Luhn Algorithm"
msgstr "Algoritmo de Luhn"
#: src/SUMMARY.md:73
#, fuzzy
msgid "Pattern Matching (TBD)"
msgstr "Correspondencia de Patrones"
#: src/SUMMARY.md:75
msgid "Day 2: Morning"
msgstr "Día 2: Mañana"
#: src/SUMMARY.md:81 src/memory-management.md:1
msgid "Memory Management"
msgstr "Manejo de Memoria"
#: src/SUMMARY.md:82
msgid "Stack vs Heap"
msgstr ""
#: src/SUMMARY.md:83
msgid "Stack Memory"
msgstr "Memoria de la Pila (_Stack_)"
#: src/SUMMARY.md:84 src/memory-management/manual.md:1
msgid "Manual Memory Management"
msgstr "Manejo Manual de Memoria"
#: src/SUMMARY.md:85 src/memory-management/scope-based.md:1
msgid "Scope-Based Memory Management"
msgstr "Manejo de Memoria basado en Scope (ámbitos)"
#: src/SUMMARY.md:86
msgid "Garbage Collection"
msgstr "Recolección de memoria residual"
#: src/SUMMARY.md:87
msgid "Rust Memory Management"
msgstr "Manejo de la Memoria en Rust"
#: src/SUMMARY.md:88 src/ownership.md:1
msgid "Ownership"
msgstr "Propiedad (_Ownership_)"
#: src/SUMMARY.md:89 src/ownership/move-semantics.md:1
msgid "Move Semantics"
msgstr "Semántica de movimiento"
#: src/SUMMARY.md:90 src/ownership/moved-strings-rust.md:1
msgid "Moved Strings in Rust"
msgstr "Cadenas movidas en Rust"
#: src/SUMMARY.md:91
msgid "Double Frees in Modern C++"
msgstr "Double free en código C++ moderno"
#: src/SUMMARY.md:92 src/ownership/moves-function-calls.md:1
msgid "Moves in Function Calls"
msgstr "Movimientos en llamadas de función"
#: src/SUMMARY.md:93 src/ownership/copy-clone.md:1
msgid "Copying and Cloning"
msgstr "Copiar y clonar"
#: src/SUMMARY.md:94 src/ownership/borrowing.md:1
msgid "Borrowing"
msgstr "Préstamos (_Borrowing_)"
#: src/SUMMARY.md:95 src/ownership/shared-unique-borrows.md:1
msgid "Shared and Unique Borrows"
msgstr "Préstamos compartidos y únicos"
#: src/SUMMARY.md:96 src/ownership/lifetimes.md:1
msgid "Lifetimes"
msgstr "Tiempos de vida"
#: src/SUMMARY.md:97 src/ownership/lifetimes-function-calls.md:1
msgid "Lifetimes in Function Calls"
msgstr "Tiempos de Vida en Llamadas a Función"
#: src/SUMMARY.md:98 src/ownership/lifetimes-data-structures.md:1
msgid "Lifetimes in Data Structures"
msgstr "Tiempos de vida en estructuras de datos"
#: src/SUMMARY.md:99 src/structs.md:1
msgid "Structs"
msgstr "Estructuras (_Structs_)"
#: src/SUMMARY.md:100 src/structs/tuple-structs.md:1
msgid "Tuple Structs"
msgstr "Estructuras de tuplas"
#: src/SUMMARY.md:101 src/structs/field-shorthand.md:1
msgid "Field Shorthand Syntax"
msgstr "Sintaxis abreviada de campos"
#: src/SUMMARY.md:103 src/methods/receiver.md:1
msgid "Method Receiver"
msgstr "Receptor de método"
#: src/SUMMARY.md:104 src/SUMMARY.md:166 src/SUMMARY.md:281
#: src/methods/example.md:1 src/concurrency/shared_state/example.md:1
msgid "Example"
msgstr "Ejemplo"
#: src/SUMMARY.md:106 src/exercises/day-2/book-library.md:1
msgid "Storing Books"
msgstr "Almacenar libros"
#: src/SUMMARY.md:107 src/exercises/day-2/health-statistics.md:1
msgid "Health Statistics"
msgstr "Estadísticas de salud"
#: src/SUMMARY.md:109
msgid "Day 2: Afternoon"
msgstr "Día 2: tarde"
#: src/SUMMARY.md:111 src/std.md:1
msgid "Standard Library"
msgstr "Biblioteca estándar"
#: src/SUMMARY.md:112
msgid "Option and Result"
msgstr "Option y Result"
#: src/SUMMARY.md:113 src/std/string.md:1
msgid "String"
msgstr "String"
#: src/SUMMARY.md:114
msgid "Vec"
msgstr "Vec"
#: src/SUMMARY.md:115
msgid "HashMap"
msgstr "HashMap"
#: src/SUMMARY.md:116
msgid "Box"
msgstr "Box"
#: src/SUMMARY.md:117
msgid "Recursive Data Types"
msgstr "Tipos de datos recursivos"
#: src/SUMMARY.md:118 src/std/box-niche.md:1
msgid "Niche Optimization"
msgstr "Optimización de la Memoria"
#: src/SUMMARY.md:119
msgid "Rc"
msgstr "Rc"
#: src/SUMMARY.md:120
msgid "Cell/RefCell"
msgstr ""
#: src/SUMMARY.md:121 src/modules.md:1
msgid "Modules"
msgstr "Módulos"
#: src/SUMMARY.md:122 src/modules/visibility.md:1
msgid "Visibility"
msgstr "Visibilidad"
#: src/SUMMARY.md:123 src/modules/paths.md:1
msgid "Paths"
msgstr "Rutas"
#: src/SUMMARY.md:124 src/modules/filesystem.md:1
msgid "Filesystem Hierarchy"
msgstr "Jerarquía del sistema de archivos"
#: src/SUMMARY.md:126 src/exercises/day-2/iterators-and-ownership.md:1
msgid "Iterators and Ownership"
msgstr "Iteradores y Ownership (Propiedad)"
#: src/SUMMARY.md:127 src/exercises/day-2/strings-iterators.md:1
#: src/exercises/day-2/solutions-afternoon.md:3
msgid "Strings and Iterators"
msgstr "Cadenas e Iteradores"
#: src/SUMMARY.md:130
msgid "Day 3: Morning"
msgstr "Día 3: Mañana"
#: src/SUMMARY.md:135 src/generics.md:1
msgid "Generics"
msgstr "Genéricos"
#: src/SUMMARY.md:136 src/generics/data-types.md:1
msgid "Generic Data Types"
msgstr "Tipos de Datos Genéricos"
#: src/SUMMARY.md:137 src/generics/methods.md:1
msgid "Generic Methods"
msgstr "Métodos Genéricos"
#: src/SUMMARY.md:138 src/generics/monomorphization.md:1
msgid "Monomorphization"
msgstr "Monomorfización"
#: src/SUMMARY.md:139 src/traits.md:1
msgid "Traits"
msgstr "Traits"
#: src/SUMMARY.md:140 src/traits/trait-objects.md:1
msgid "Trait Objects"
msgstr "Objetos Trait"
#: src/SUMMARY.md:141 src/traits/deriving-traits.md:1
msgid "Deriving Traits"
msgstr "Derivación de Traits"
#: src/SUMMARY.md:142 src/traits/default-methods.md:1
msgid "Default Methods"
msgstr "Métodos por Default"
#: src/SUMMARY.md:143 src/traits/trait-bounds.md:1
msgid "Trait Bounds"
msgstr "Límites Trait (Bounds)"
#: src/SUMMARY.md:144
msgid "impl Trait"
msgstr "impl Trait"
#: src/SUMMARY.md:145 src/traits/important-traits.md:1
msgid "Important Traits"
msgstr "Traits Importantes"
#: src/SUMMARY.md:146
msgid "Iterator"
msgstr "Iteradores"
#: src/SUMMARY.md:147 src/traits/from-iterator.md:1
msgid "FromIterator"
msgstr "FromIterator"
#: src/SUMMARY.md:148
msgid "From and Into"
msgstr "From e Into"
#: src/SUMMARY.md:149
msgid "Read and Write"
msgstr "Read y Write"
#: src/SUMMARY.md:150
msgid "Drop"
msgstr ""
#: src/SUMMARY.md:151
msgid "Default"
msgstr ""
#: src/SUMMARY.md:152
msgid "Operators: Add, Mul, ..."
msgstr "Operadores: Add, Mul, …."
#: src/SUMMARY.md:153
msgid "Closures: Fn, FnMut, FnOnce"
msgstr ""
#: src/SUMMARY.md:155 src/exercises/day-3/simple-gui.md:1
#: src/exercises/day-3/solutions-morning.md:3
msgid "A Simple GUI Library"
msgstr "Una Biblioteca GUI sencilla"
#: src/SUMMARY.md:156 src/exercises/day-3/solutions-morning.md:175
msgid "Points and Polygons"
msgstr "Puntos y Polígonos"
#: src/SUMMARY.md:158
msgid "Day 3: Afternoon"
msgstr "Día 3: Tarde"
#: src/SUMMARY.md:160 src/error-handling.md:1
msgid "Error Handling"
msgstr "Manejo de Errores"
#: src/SUMMARY.md:161 src/error-handling/panics.md:1
msgid "Panics"
msgstr ""
#: src/SUMMARY.md:162
msgid "Catching Stack Unwinding"
msgstr "Catching Stack Unwinding"
#: src/SUMMARY.md:163
msgid "Structured Error Handling"
msgstr "Manejo de Errores Estructurado"
#: src/SUMMARY.md:164
msgid "Propagating Errors with ?"
msgstr "Propagación de Errores con ?"
#: src/SUMMARY.md:165 src/error-handling/converting-error-types.md:1
#: src/error-handling/converting-error-types-example.md:1
msgid "Converting Error Types"
msgstr "Conversión de Tipos de Errores"
#: src/SUMMARY.md:167 src/error-handling/deriving-error-enums.md:1
msgid "Deriving Error Enums"
msgstr "Derivación de Enums de Error"
#: src/SUMMARY.md:168 src/error-handling/dynamic-errors.md:1
msgid "Dynamic Error Types"
msgstr "Tipos de Errores Dinámicos"
#: src/SUMMARY.md:169 src/error-handling/error-contexts.md:1
msgid "Adding Context to Errors"
msgstr "Añadir Contexto a los Errores"
#: src/SUMMARY.md:170 src/testing.md:1
msgid "Testing"
msgstr "Probando"
#: src/SUMMARY.md:171 src/testing/unit-tests.md:1
msgid "Unit Tests"
msgstr "Pruebas Unitarias"
#: src/SUMMARY.md:172 src/testing/test-modules.md:1
msgid "Test Modules"
msgstr "Módulos de Pruebas"
#: src/SUMMARY.md:173 src/testing/doc-tests.md:1
msgid "Documentation Tests"
msgstr "Pruebas de Documentación"
#: src/SUMMARY.md:174 src/testing/integration-tests.md:1
msgid "Integration Tests"
msgstr "Pruebas de Integración"
#: src/SUMMARY.md:175 src/bare-metal/useful-crates.md:1
msgid "Useful crates"
msgstr "Crates Útiles"
#: src/SUMMARY.md:176 src/unsafe.md:1
msgid "Unsafe Rust"
msgstr "Unsafe Rust"
#: src/SUMMARY.md:177 src/unsafe/raw-pointers.md:1
msgid "Dereferencing Raw Pointers"
msgstr "Dereferenciación de Punteros Sin Formato"
#: src/SUMMARY.md:178 src/unsafe/mutable-static-variables.md:1
msgid "Mutable Static Variables"
msgstr "Variables Estáticas Mutables"
#: src/SUMMARY.md:179 src/unsafe/unions.md:1
msgid "Unions"
msgstr "Uniones"
#: src/SUMMARY.md:180 src/unsafe/calling-unsafe-functions.md:1
msgid "Calling Unsafe Functions"
msgstr "Llamar Funciones Unsafe (Inseguras)"
#: src/SUMMARY.md:181 src/unsafe/writing-unsafe-functions.md:1
msgid "Writing Unsafe Functions"
msgstr "Escribir Funciones Unsafe (Inseguras)"
#: src/SUMMARY.md:182
msgid "Extern Functions"
msgstr "Funciones Externas"
#: src/SUMMARY.md:183 src/unsafe/unsafe-traits.md:1
msgid "Implementing Unsafe Traits"
msgstr "Implementación de Traits Unsafe (Inseguras) "
#: src/SUMMARY.md:185 src/exercises/day-3/safe-ffi-wrapper.md:1
#: src/exercises/day-3/solutions-afternoon.md:3
msgid "Safe FFI Wrapper"
msgstr "Envoltorio de FFI Seguro"
#: src/SUMMARY.md:188 src/SUMMARY.md:258 src/bare-metal/android.md:1
msgid "Android"
msgstr ""
#: src/SUMMARY.md:193 src/android/setup.md:1
msgid "Setup"
msgstr "Configurar"
#: src/SUMMARY.md:194 src/android/build-rules.md:1
msgid "Build Rules"
msgstr "Reglas de Compilación (Build)"
#: src/SUMMARY.md:195
msgid "Binary"
msgstr "Binarios"
#: src/SUMMARY.md:196
msgid "Library"
msgstr "Biblioteca"
#: src/SUMMARY.md:197 src/android/aidl.md:1
msgid "AIDL"
msgstr ""
#: src/SUMMARY.md:198
msgid "Interface"
msgstr "Interfaz"
#: src/SUMMARY.md:199
msgid "Implementation"
msgstr "Implementación"
#: src/SUMMARY.md:200
msgid "Server"
msgstr "Servidor"
#: src/SUMMARY.md:201 src/android/aidl/deploy.md:1
msgid "Deploy"
msgstr "Despliegue"
#: src/SUMMARY.md:202
msgid "Client"
msgstr "Cliente"
#: src/SUMMARY.md:203 src/android/aidl/changing.md:1
msgid "Changing API"
msgstr "Cambio de API"
#: src/SUMMARY.md:204 src/SUMMARY.md:248 src/android/logging.md:1
#: src/bare-metal/aps/logging.md:1
msgid "Logging"
msgstr "Almacenamiento de registros"
#: src/SUMMARY.md:205 src/android/interoperability.md:1
msgid "Interoperability"
msgstr "Interoperabilidad"
#: src/SUMMARY.md:206
msgid "With C"
msgstr "Con C"
#: src/SUMMARY.md:207
msgid "Calling C with Bindgen"
msgstr "Llamar a C con Bindgen"
#: src/SUMMARY.md:208
msgid "Calling Rust from C"
msgstr "Llamar a Rust desde C"
#: src/SUMMARY.md:209 src/android/interoperability/cpp.md:1
msgid "With C++"
msgstr "Con C++"
#: src/SUMMARY.md:210
msgid "With Java"
msgstr "Con Java"
#: src/SUMMARY.md:214
msgid "Bare Metal: Morning"
msgstr "Bare Metal: mañana"
#: src/SUMMARY.md:219
msgid "no_std"
msgstr "no_std"
#: src/SUMMARY.md:220
msgid "A Minimal Example"
msgstr "Un Pequeño Ejemplo"
#: src/SUMMARY.md:221
msgid "alloc"
msgstr "alloc"
#: src/SUMMARY.md:222 src/bare-metal/microcontrollers.md:1
msgid "Microcontrollers"
msgstr "Microcontroladores"
#: src/SUMMARY.md:223 src/bare-metal/microcontrollers/mmio.md:1
msgid "Raw MMIO"
msgstr "MMIO sin procesar"
#: src/SUMMARY.md:224
msgid "PACs"
msgstr "PAC"
#: src/SUMMARY.md:225
msgid "HAL Crates"
msgstr "Crates HAL"
#: src/SUMMARY.md:226
msgid "Board Support Crates"
msgstr "Crates de Soporte de Placa"
#: src/SUMMARY.md:227
msgid "The Type State Pattern"
msgstr "El Patrón de Tipo de Estado"
#: src/SUMMARY.md:228
msgid "embedded-hal"
msgstr "embedded-hal"
#: src/SUMMARY.md:229
msgid "probe-rs, cargo-embed"
msgstr "probe-rs, cargo-embed"
#: src/SUMMARY.md:230 src/bare-metal/microcontrollers/debugging.md:1
msgid "Debugging"
msgstr "Depuración"
#: src/SUMMARY.md:231 src/SUMMARY.md:251
msgid "Other Projects"
msgstr "Otros proyectos"
#: src/SUMMARY.md:233 src/exercises/bare-metal/compass.md:1
#: src/exercises/bare-metal/solutions-morning.md:3
msgid "Compass"
msgstr "Brújula"
#: src/SUMMARY.md:235
msgid "Bare Metal: Afternoon"
msgstr "Bare Metal: tarde"
#: src/SUMMARY.md:237
msgid "Application Processors"
msgstr "Procesadores de aplicaciones"
#: src/SUMMARY.md:238 src/bare-metal/aps/entry-point.md:1
msgid "Getting Ready to Rust"
msgstr "Iniciación a Rust"
#: src/SUMMARY.md:239
msgid "Inline Assembly"
msgstr "Ensamblador en línea"
#: src/SUMMARY.md:240
msgid "MMIO"
msgstr "MMIO"
#: src/SUMMARY.md:241
msgid "Let's Write a UART Driver"
msgstr "Escribir un controlador UART"
#: src/SUMMARY.md:242
msgid "More Traits"
msgstr "Más traits"
#: src/SUMMARY.md:243
msgid "A Better UART Driver"
msgstr "Un controlador UART mejor"
#: src/SUMMARY.md:244 src/bare-metal/aps/better-uart/bitflags.md:1
msgid "Bitflags"
msgstr "Bitflags"
#: src/SUMMARY.md:245
msgid "Multiple Registers"
msgstr "Varios registros"
#: src/SUMMARY.md:246 src/bare-metal/aps/better-uart/driver.md:1
msgid "Driver"
msgstr "Conductor"
#: src/SUMMARY.md:247 src/SUMMARY.md:249
msgid "Using It"
msgstr "Cómo usarlo"
#: src/SUMMARY.md:250 src/bare-metal/aps/exceptions.md:1
msgid "Exceptions"
msgstr "Excepciones"
#: src/SUMMARY.md:252
msgid "Useful Crates"
msgstr "Crates útiles"
#: src/SUMMARY.md:253
msgid "zerocopy"
msgstr "zerocopy"
#: src/SUMMARY.md:254
msgid "aarch64-paging"
msgstr "aarch64-paging"
#: src/SUMMARY.md:255
msgid "buddy_system_allocator"
msgstr "buddy_system_allocator"
#: src/SUMMARY.md:256
msgid "tinyvec"
msgstr "tinyvec"
#: src/SUMMARY.md:257
msgid "spin"
msgstr "girar"
#: src/SUMMARY.md:259 src/bare-metal/android/vmbase.md:1
msgid "vmbase"
msgstr "vmbase"
#: src/SUMMARY.md:261
msgid "RTC Driver"
msgstr "Controlador RTC"
#: src/SUMMARY.md:264
msgid "Concurrency: Morning"
msgstr "Concurrencia: mañana"
#: src/SUMMARY.md:269 src/concurrency/threads.md:1
msgid "Threads"
msgstr "Hilos"
#: src/SUMMARY.md:270 src/concurrency/scoped-threads.md:1
msgid "Scoped Threads"
msgstr "Hilos con ámbito"
#: src/SUMMARY.md:271 src/concurrency/channels.md:1
msgid "Channels"
msgstr "Canales"
#: src/SUMMARY.md:272 src/concurrency/channels/unbounded.md:1
msgid "Unbounded Channels"
msgstr "Canales sin límites"
#: src/SUMMARY.md:273 src/concurrency/channels/bounded.md:1
msgid "Bounded Channels"
msgstr "Canales delimitados"
#: src/SUMMARY.md:274
msgid "Send and Sync"
msgstr "Send y Sync"
#: src/SUMMARY.md:274
msgid "Send"
msgstr "Enviar"
#: src/SUMMARY.md:274
msgid "Sync"
msgstr "Sincronizar"
#: src/SUMMARY.md:277 src/concurrency/send-sync/examples.md:1
msgid "Examples"
msgstr "Ejemplos"
#: src/SUMMARY.md:278 src/concurrency/shared_state.md:1
msgid "Shared State"
msgstr "Estado compartido"
#: src/SUMMARY.md:279
msgid "Arc"
msgstr "Arco"
#: src/SUMMARY.md:280
msgid "Mutex"
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 "La cena de los filósofos"
#: src/SUMMARY.md:284 src/exercises/concurrency/link-checker.md:1
msgid "Multi-threaded Link Checker"
msgstr "Comprobador de enlaces multihilo"
#: src/SUMMARY.md:286
msgid "Concurrency: Afternoon"
msgstr "Concurrencia: tarde"
#: src/SUMMARY.md:288
msgid "Async Basics"
msgstr "Conceptos básicos de Async"
#: src/SUMMARY.md:289
msgid "async/await"
msgstr "async / await"
#: src/SUMMARY.md:290 src/async/futures.md:1
msgid "Futures"
msgstr "Future"
#: src/SUMMARY.md:291 src/async/runtimes.md:1
msgid "Runtimes"
msgstr "Runtimes (Tiempos de Ejecución)"
#: src/SUMMARY.md:292 src/async/runtimes/tokio.md:1
msgid "Tokio"
msgstr "Tokio"
#: 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 "Tasks"
#: src/SUMMARY.md:294 src/async/channels.md:1
msgid "Async Channels"
msgstr "Canales asíncronos"
#: src/SUMMARY.md:296 src/async/control-flow/join.md:1
msgid "Join"
msgstr "Unirme"
#: src/SUMMARY.md:297 src/async/control-flow/select.md:1
msgid "Select"
msgstr "Seleccionar"
#: src/SUMMARY.md:298
msgid "Pitfalls"
msgstr "Inconvenientes"
#: src/SUMMARY.md:299
msgid "Blocking the Executor"
msgstr "Bloqueo del ejecutor"
#: src/SUMMARY.md:300 src/async/pitfalls/pin.md:1
msgid "Pin"
msgstr "Fijar"
#: src/SUMMARY.md:301 src/async/pitfalls/async-traits.md:1
msgid "Async Traits"
msgstr "Traits asíncronos"
#: src/SUMMARY.md:302 src/async/pitfalls/cancellation.md:1
msgid "Cancellation"
msgstr "Cancelación"
#: src/SUMMARY.md:305 src/exercises/concurrency/chat-app.md:1
#: src/exercises/concurrency/solutions-afternoon.md:119
msgid "Broadcast Chat Application"
msgstr "Aplicación de chat de difusión"
#: src/SUMMARY.md:308
msgid "Final Words"
msgstr "Conclusiones"
#: src/SUMMARY.md:312 src/thanks.md:1
msgid "Thanks!"
msgstr "Gracias."
#: src/SUMMARY.md:313
msgid "Other Resources"
msgstr "Otros recursos"
#: src/SUMMARY.md:314 src/credits.md:1
msgid "Credits"
msgstr "Créditos"
#: src/SUMMARY.md:317 src/exercises/solutions.md:1
msgid "Solutions"
msgstr "Soluciones"
#: src/SUMMARY.md:322
msgid "Day 1 Morning"
msgstr "Día 1: mañana"
#: src/SUMMARY.md:323
msgid "Day 1 Afternoon"
msgstr "Día 1: tarde"
#: src/SUMMARY.md:324
msgid "Day 2 Morning"
msgstr "Día 2: mañana"
#: src/SUMMARY.md:325
msgid "Day 2 Afternoon"
msgstr "Día 2: tarde"
#: src/SUMMARY.md:326
msgid "Day 3 Morning"
msgstr "Día 3: mañana"
#: src/SUMMARY.md:327
msgid "Day 3 Afternoon"
msgstr "Día 3: tarde"
#: src/SUMMARY.md:328
msgid "Bare Metal Rust Morning"
msgstr "Rust Bare Metal: mañana"
#: src/SUMMARY.md:329 src/exercises/bare-metal/solutions-afternoon.md:1
msgid "Bare Metal Rust Afternoon"
msgstr "Rust Bare Metal: tarde"
#: src/SUMMARY.md:330
msgid "Concurrency Morning"
msgstr "Concurrencia: mañana"
#: src/SUMMARY.md:331
msgid "Concurrency Afternoon"
msgstr "Concurrencia: tarde"
#: src/index.md:3
msgid ""
"[![Build workflow](https://img.shields.io/github/actions/workflow/status/"
"google/comprehensive-rust/build.yml?style=flat-square)](https://github.com/"
"google/comprehensive-rust/actions/workflows/build.yml?query=branch%3Amain) [!"
"[GitHub contributors](https://img.shields.io/github/contributors/google/"
"comprehensive-rust?style=flat-square)](https://github.com/google/"
"comprehensive-rust/graphs/contributors) [![GitHub stars](https://img.shields."
"io/github/stars/google/comprehensive-rust?style=flat-square)](https://github."
"com/google/comprehensive-rust/stargazers)"
msgstr ""
#: src/index.md:7
msgid ""
"This is a free Rust course developed by the Android team at Google. The "
"course covers the full spectrum of Rust, from basic syntax to advanced "
"topics like generics and error handling."
msgstr ""
"Este es un curso de Rust de tres días que ha desarrollado el equipo de "
"Android de Google. El curso abarca todo lo relacionado con Rust, desde la "
"sintaxis básica hasta temas avanzados como los genéricos y la gestión de "
"errores. También incluye contenidos específicos de Android el último día."
#: src/index.md:11
msgid ""
"The latest version of the course can be found at . If you are reading somewhere else, please check there "
"for updates."
msgstr ""
"La última versión del curso se puede encontrar en . Si lo estás leyendo en otro lugar, consulta allí para "
"obtener actualizaciones."
#: src/index.md:15
msgid ""
"The goal of the course is to teach you Rust. We assume you don't know "
"anything about Rust and hope to:"
msgstr ""
"El objetivo del curso es enseñarte Rust. Suponemos que no sabes nada sobre "
"Rust y esperamos lograr lo siguiente:"
#: src/index.md:18
msgid "Give you a comprehensive understanding of the Rust syntax and language."
msgstr "Darte un entendimiento comprensivo de la sintaxis y lenguaje Rust."
#: src/index.md:19
msgid "Enable you to modify existing programs and write new programs in Rust."
msgstr "Permitirte modificar programas de Rust y escribir otros nuevos."
#: src/index.md:20
msgid "Show you common Rust idioms."
msgstr "Brindarte idiomática propia de Rust."
#: src/index.md:22
msgid "We call the first three course days Rust Fundamentals."
msgstr "Llamamos a los tres primeros días del curso Fundamentos de Rust."
#: src/index.md:24
msgid ""
"Building on this, you're invited to dive into one or more specialized topics:"
msgstr ""
"Basándonos en esto, te invitamos a profundizar en uno o más temas "
"especializados:"
#: src/index.md:26
msgid ""
"[Android](android.md): a half-day course on using Rust for Android platform "
"development (AOSP). This includes interoperability with C, C++, and Java."
msgstr ""
"[Android](android.md): un curso de medio día sobre el uso de Rust en el "
"desarrollo de la plataforma Android (AOSP). En él se incluye la "
"interoperabilidad con C, C++ y Java."
#: src/index.md:28
msgid ""
"[Bare-metal](bare-metal.md): a whole-day class on using Rust for bare-metal "
"(embedded) development. Both microcontrollers and application processors are "
"covered."
msgstr ""
"[Bare Metal](bare-metal.md): una clase de un día sobre el uso de Rust para "
"el desarrollo bare-metal (insertado). Se tratarán tanto los "
"microcontroladores como los procesadores de aplicaciones."
#: src/index.md:31
msgid ""
"[Concurrency](concurrency.md): a whole-day class on concurrency in Rust. We "
"cover both classical concurrency (preemptively scheduling using threads and "
"mutexes) and async/await concurrency (cooperative multitasking using "
"futures)."
msgstr ""
"[Concurrencia](concurrency.md): una clase de un día sobre concurrencia en "
"Rust. Abordaremos tanto la concurrencia clásica (programación interrumpible "
"mediante hilos y exclusiones mutuas), como la concurrencia async / await "
"(multitarea cooperativa mediante traits future)."
#: src/index.md:37
msgid "Non-Goals"
msgstr "Objetivos que no trataremos"
#: src/index.md:39
msgid ""
"Rust is a large language and we won't be able to cover all of it in a few "
"days. Some non-goals of this course are:"
msgstr ""
"Rust es un lenguaje muy amplio y no podremos abarcarlo todo en unos pocos "
"días. Algunos de los objetivos que no se plantean en este curso son los "
"siguientes:"
#: src/index.md:42
msgid ""
"Learning how to develop macros: please see [Chapter 19.5 in the Rust Book]"
"(https://doc.rust-lang.org/book/ch19-06-macros.html) and [Rust by Example]"
"(https://doc.rust-lang.org/rust-by-example/macros.html) instead."
msgstr ""
"Aprender a desarrollar macros: consulta el [capítulo 19.5 del Libro de Rust ]"
"(https://doc.rust-lang.org/book/ch19-06-macros.html) y [Rust by Example]"
"(https://doc.rust-lang.org/rust-by-example/macros.html)."
#: src/index.md:46
msgid "Assumptions"
msgstr "Suposiciones"
#: src/index.md:48
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 "
"C++ to better explain or contrast the Rust approach."
msgstr ""
"El curso presupone que ya sabes programar. Rust es un lenguaje estáticamente "
"tipado y, a veces, haremos comparaciones con C y C++ para explicarlo mejor o "
"contrastar nuestro enfoque."
#: src/index.md:52
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."
msgstr ""
"Si sabes programar en un lenguaje dinámicamente tipado, como Python o "
"JavaScript, podrás seguir el ritmo sin problema."
#: src/index.md:57
msgid ""
"This is an example of a _speaker note_. We will use these to add additional "
"information to the slides. This could be key points which the instructor "
"should cover as well as answers to typical questions which come up in class."
msgstr ""
"Este es un ejemplo de una _nota del orador_. Las utilizaremos para añadir "
"información adicional a las diapositivas. Puede tratarse de puntos clave que "
"el instructor debería tratar, así como de respuestas a preguntas frecuentes "
"que surgen en clase."
#: src/running-the-course.md:3 src/running-the-course/course-structure.md:3
msgid "This page is for the course instructor."
msgstr "Esta página está dirigida al instructor del curso."
#: src/running-the-course.md:5
msgid ""
"Here is a bit of background information about how we've been running the "
"course internally at Google."
msgstr ""
"A continuación, te ofrecemos información general sobre cómo se ha "
"desarrollado el curso en Google."
#: src/running-the-course.md:8
msgid ""
"We typically run classes from 10:00 am to 4:00 pm, with a 1 hour lunch break "
"in the middle. This leaves 2.5 hours for the morning class and 2.5 hours for "
"the afternoon class. Note that this is just a recommendation: you can also "
"spend 3 hour on the morning session to give people more time for exercises. "
"The downside of longer session is that people can become very tired after 6 "
"full hours of class in the afternoon."
msgstr ""
"Normalmente, impartimos las clases de 10:00 a 16:00, con una pausa para "
"comer de una hora. Esto deja 2,5 horas para la clase de la mañana y 2,5 "
"horas para la clase de la tarde. Ten en cuenta que esta es solo una "
"recomendación: también puedes dedicar 3 horas a la sesión de la mañana para "
"dar a la gente más tiempo para los ejercicios. El inconveniente de las "
"sesiones más largas es que la gente puede cansarse mucho después de 6 horas "
"completas de clase por la tarde."
#: src/running-the-course.md:16
msgid "Before you run the course, you will want to:"
msgstr "Antes de impartir el curso, te recomdamos hacer lo siguiente:"
#: src/running-the-course.md:18
msgid ""
"Make yourself familiar with the course material. We've included speaker "
"notes to help highlight the key points (please help us by contributing more "
"speaker notes!). When presenting, you should make sure to open the speaker "
"notes in a popup (click the link with a little arrow next to \"Speaker "
"Notes\"). This way you have a clean screen to present to the class."
msgstr ""
"Familiarízate con el material del curso. Hemos incluido notas del orador "
"para destacar los puntos clave (ayúdanos a añadir más notas de este tipo). "
"Cuando hagas una presentación, asegúrate de abrir las notas del orador en "
"una ventana emergente (haz clic en el enlace que tiene una pequeña flecha "
"junto a \"Notas del orador\"). De esta manera, tendrás una pantalla "
"despejada para mostrar a la clase."
#: src/running-the-course.md:24
msgid ""
"Decide on the dates. Since the course takes at least three full days, we "
"recommend that you schedule the days over two weeks. Course participants "
"have said that they find it helpful to have a gap in the course since it "
"helps them process all the information we give them."
msgstr ""
"Decide bien las fechas. Dado que el curso dura al menos tres días completos, "
"te recomendamos que repartas los días a lo largo de dos semanas. Los "
"participantes del curso han dicho que les resulta útil hacer pausas durante "
"el curso, ya que les ayuda a procesar toda la información que les "
"proporcionamos."
#: src/running-the-course.md:29
msgid ""
"Find a room large enough for your in-person participants. We recommend a "
"class size of 15-25 people. That's small enough that people are comfortable "
"asking questions --- it's also small enough that one instructor will have "
"time to answer the questions. Make sure the room has _desks_ for yourself "
"and for the students: you will all need to be able to sit and work with your "
"laptops. In particular, you will be doing a lot of live-coding as an "
"instructor, so a lectern won't be very helpful for you."
msgstr ""
"Busca una sala con capacidad suficiente para los participantes presenciales. "
"Recomendamos una sala para entre 15 y 25 personas. Es el tamaño ideal para "
"que los alumnos se sientan cómodos haciendo preguntas y para que el profesor "
"tenga tiempo de responderlas. Asegúrate de que en la sala haya _mesas_ para "
"ti y para los alumnos: todos necesitaréis sentaros y trabajar con vuestros "
"portátiles. Además, como instructor, programarás mucho en directo, por lo "
"que un atril no te resultará muy útil."
#: src/running-the-course.md:37
msgid ""
"On the day of your course, show up to the room a little early to set things "
"up. We recommend presenting directly using `mdbook serve` running on your "
"laptop (see the [installation instructions](https://github.com/google/"
"comprehensive-rust#building)). This ensures optimal performance with no lag "
"as you change pages. Using your laptop will also allow you to fix typos as "
"you or the course participants spot them."
msgstr ""
"El mismo día del curso, llega con antelación a la clase para preparar todo "
"lo necesario. Te recomendamos que realices la presentación directamente "
"desde `mdbook serve` en tu portátil (consulta las \\[instrucciones de "
"instalación\\]\\[3\\]). Así conseguirás un rendimiento óptimo y que no haya "
"demoras al pasar de una página a otra. También podrás corregir las erratas a "
"medida que tú o los participantes del curso las detectéis."
#: src/running-the-course.md:43
msgid ""
"Let people solve the exercises by themselves or in small groups. We "
"typically spend 30-45 minutes on exercises in the morning and in the "
"afternoon (including time to review the solutions). Make sure to ask people "
"if they're stuck or if there is anything you can help with. When you see "
"that several people have the same problem, call it out to the class and "
"offer a solution, e.g., by showing people where to find the relevant "
"information in the standard library."
msgstr ""
"Deja que los alumnos resuelvan los ejercicios por sí mismos o en pequeños "
"grupos. Solemos dedicar entre 30 y 45 minutos a los ejercicios por la mañana "
"y por la tarde (incluido el tiempo para revisar las soluciones). Asegúrate "
"de preguntar a los asistentes si les está costando hacerlo o si hay algo en "
"lo que puedas ayudarles. Cuando veas que varias personas tienen el mismo "
"problema, coméntalo delante de la clase y ofrece una solución. Por ejemplo, "
"enséñales dónde encontrar la información importante en la biblioteca "
"estándar."
#: src/running-the-course.md:51
msgid ""
"That is all, good luck running the course! We hope it will be as much fun "
"for you as it has been for us!"
msgstr ""
"Eso es todo. ¡Buena suerte con el curso! Esperamos que te diviertas tanto "
"como nosotros."
#: src/running-the-course.md:54
msgid ""
"Please [provide feedback](https://github.com/google/comprehensive-rust/"
"discussions/86) afterwards so that we can keep improving the course. We "
"would love to hear what worked well for you and what can be made better. "
"Your students are also very welcome to [send us feedback](https://github.com/"
"google/comprehensive-rust/discussions/100)!"
msgstr ""
"Después, [envíanos un comentario](https://github.com/google/comprehensive-"
"rust/discussions/86) para que podamos seguir mejorando el curso. Estaremos "
"encantados de que nos cuentes qué aspectos destacarías y qué se puede "
"mejorar. Tus alumnos también pueden [enviarnos sus sugerencias](https://"
"github.com/google/comprehensive-rust/discussions/100)!"
#: src/running-the-course/course-structure.md:5
msgid "Rust Fundamentals"
msgstr "Fundamentos de 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 ""
"Los primeros tres días forman los [Fundamentos de Rust](../welcome-day-1."
"md). Los días son muy intensos y cubrimos mucho terreno:"
#: src/running-the-course/course-structure.md:10
msgid "Day 1: Basic Rust, syntax, control flow, creating and consuming values."
msgstr ""
"Día 1: Rust Básico, sintaxis, control de flujo, creación y consumo de "
"valores."
#: src/running-the-course/course-structure.md:11
msgid ""
"Day 2: Memory management, ownership, compound data types, and the standard "
"library."
msgstr ""
"Día 2: Gestión de memoria, _ownership_ (propiedad), tipos de datos "
"compuestos y la biblioteca estándar."
#: src/running-the-course/course-structure.md:12
msgid "Day 3: Generics, traits, error handling, testing, and unsafe Rust."
msgstr ""
"Día 3: Genéricos, _traits_, gestión de errores, pruebas y _unsafe_ "
"(inseguro) Rust."
#: src/running-the-course/course-structure.md:14
msgid "Deep Dives"
msgstr "Información más detallada"
#: src/running-the-course/course-structure.md:16
msgid ""
"In addition to the 3-day class on Rust Fundamentals, we cover some more "
"specialized topics:"
msgstr ""
"Además de la clase de 3 días sobre los fundamentos de Rust, abordamos "
"algunos temas más especializados:"
#: src/running-the-course/course-structure.md:19
msgid "Rust in Android"
msgstr "Rust en Android"
#: src/running-the-course/course-structure.md:21
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 "
"C, C++, and Java."
msgstr ""
"[Rust en Android](../android.md) es un curso de medio día sobre el uso de "
"Rust para el desarrollo de la plataforma Android. En él se incluye la "
"interoperabilidad con C, C++ y Java."
#: src/running-the-course/course-structure.md:25
msgid ""
"You will need an [AOSP checkout](https://source.android.com/docs/setup/"
"download/downloading). Make a checkout of the [course repository](https://"
"github.com/google/comprehensive-rust) on the same machine and move the `src/"
"android/` directory into the root of your AOSP checkout. This will ensure "
"that the Android build system sees the `Android.bp` files in `src/android/`."
msgstr ""
"Necesitarás [conseguir el AOSP](https://source.android.com/docs/setup/"
"download/downloading). Descarga el [repositorio del curso](https://github."
"com/google/comprehensive-rust) en el mismo ordenador y mueve el directorio "
"`src/android/` a la raíz del AOSP. De esta forma, el sistema de compilación "
"de Android verá los archivos `Android.bp` en `src/android/`."
#: src/running-the-course/course-structure.md:30
msgid ""
"Ensure that `adb sync` works with your emulator or real device and pre-build "
"all Android examples using `src/android/build_all.sh`. Read the script to "
"see the commands it runs and make sure they work when you run them by hand."
msgstr ""
"Asegúrate que `adb sync` funciona con tu emulador o en un dispositivo físico "
"y haz pre-build en todos los ejemplos de Android usando `src/android/"
"build_all.sh`. Lee el script para ver los comandos que corren y asegúrate "
"que funcionan cuando lo corres a mano."
#: src/running-the-course/course-structure.md:37
msgid "Bare-Metal Rust"
msgstr ""
#: src/running-the-course/course-structure.md:39
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 "
"application processors are covered."
msgstr ""
"[Bare Metal Rust](../bare-metal.md) es una clase de un día sobre cómo usar "
"Rust para el desarrollo bare-metal (insertado). Se tratarán tanto "
"microcontroladores como procesadores de aplicaciones."
#: src/running-the-course/course-structure.md:43
msgid ""
"For the microcontroller part, you will need to buy the [BBC micro:bit]"
"(https://microbit.org/) v2 development board ahead of time. Everybody will "
"need to install a number of packages as described on the [welcome page](../"
"bare-metal.md)."
msgstr ""
"Para la parte de los microcontroladores, necesitarás comprar con antelación "
"la segunda versión de la placa programable [BBC micro:bit](https://microbit."
"org/). Todo el mundo deberá instalar una serie de paquetes, tal como se "
"describe en la [página de bienvenida](../bare-metal.md)."
#: src/running-the-course/course-structure.md:48
msgid "Concurrency in Rust"
msgstr "Concurrencia en Rust"
#: src/running-the-course/course-structure.md:50
msgid ""
"The [Concurrency in Rust](../concurrency.md) deep dive is a full day class "
"on classical as well as `async`/`await` concurrency."
msgstr ""
"[Concurrencia en profundidad](../concurrency.md) es una clase de un día "
"sobre la concurrencia clásica y la concurrencia `async`/`await`."
#: src/running-the-course/course-structure.md:53
msgid ""
"You will need a fresh crate set up and the dependencies downloaded and ready "
"to go. You can then copy/paste the examples into `src/main.rs` to experiment "
"with them:"
msgstr ""
"Necesitarás configurar un nuevo crate, y descargar y preparar las "
"dependencias. A continuación, podrás copiar y pegar los ejemplos en `src/"
"main.rs` para experimentar con ellos:"
#: src/running-the-course/course-structure.md:57
msgid ""
"```shell\n"
"cargo init concurrency\n"
"cd concurrency\n"
"cargo add tokio --features full\n"
"cargo run\n"
"```"
msgstr ""
"```shell\n"
"cargo init concurrency\n"
"cd concurrency\n"
"cargo add tokio --features full\n"
"cargo run\n"
"```"
#: src/running-the-course/course-structure.md:64
msgid "Format"
msgstr "Formato"
#: src/running-the-course/course-structure.md:66
msgid ""
"The course is meant to be very interactive and we recommend letting the "
"questions drive the exploration of Rust!"
msgstr ""
"El curso está pensado para ser muy interactivo, por lo que te recomendamos "
"que dejes que las preguntas guíen el aprendizaje de Rust."
#: src/running-the-course/keyboard-shortcuts.md:3
msgid "There are several useful keyboard shortcuts in mdBook:"
msgstr "Existen varias combinaciones de teclas útiles en mdBook:"
#: src/running-the-course/keyboard-shortcuts.md:5
msgid "Arrow-Left"
msgstr "Flecha izquierda"
#: src/running-the-course/keyboard-shortcuts.md:5
msgid ": Navigate to the previous page."
msgstr ": ir a la página anterior."
#: src/running-the-course/keyboard-shortcuts.md:6
msgid "Arrow-Right"
msgstr "Flecha derecha"
#: src/running-the-course/keyboard-shortcuts.md:6
msgid ": Navigate to the next page."
msgstr ": ir a la página siguiente."
#: src/running-the-course/keyboard-shortcuts.md:7 src/cargo/code-samples.md:19
msgid "Ctrl + Enter"
msgstr "Ctrl + Intro"
#: src/running-the-course/keyboard-shortcuts.md:7
msgid ": Execute the code sample that has focus."
msgstr ": ejecutar el código de ejemplo seleccionado."
#: src/running-the-course/keyboard-shortcuts.md:8
msgid "s"
msgstr "s"
#: src/running-the-course/keyboard-shortcuts.md:8
msgid ": Activate the search bar."
msgstr ": activar la barra de búsqueda."
#: src/running-the-course/translations.md:3
msgid ""
"The course has been translated into other languages by a set of wonderful "
"volunteers:"
msgstr ""
"El curso se ha traducido a otros idiomas gracias a grupo de maravillosos "
"voluntarios:"
#: src/running-the-course/translations.md:6
msgid ""
"[Brazilian Portuguese](https://google.github.io/comprehensive-rust/pt-BR/) "
"by [@rastringer](https://github.com/rastringer), [@hugojacob](https://github."
"com/hugojacob), [@joaovicmendes](https://github.com/joaovicmendes) and "
"[@henrif75](https://github.com/henrif75)."
msgstr ""
#: src/running-the-course/translations.md:7
msgid ""
"[Korean](https://google.github.io/comprehensive-rust/ko/) by [@keispace]"
"(https://github.com/keispace), [@jiyongp](https://github.com/jiyongp) and "
"[@jooyunghan](https://github.com/jooyunghan)."
msgstr ""
#: src/running-the-course/translations.md:9
msgid ""
"Use the language picker in the top-right corner to switch between languages."
msgstr ""
"Cambia el idioma con el selector situado en la esquina superior derecha."
#: src/running-the-course/translations.md:11
msgid "Incomplete Translations"
msgstr "Traducciones Incompletas"
#: src/running-the-course/translations.md:13
msgid ""
"There is a large number of in-progress translations. We link to the most "
"recently updated translations:"
msgstr ""
"Hay muchas traducciones todavía en curso. A continuación, incluimos enlaces "
"a las traducciones más actualizadas:"
#: src/running-the-course/translations.md:16
msgid ""
"[Bengali](https://google.github.io/comprehensive-rust/bn/) by [@raselmandol]"
"(https://github.com/raselmandol)."
msgstr ""
#: src/running-the-course/translations.md:17
msgid ""
"[French](https://google.github.io/comprehensive-rust/fr/) by [@KookaS]"
"(https://github.com/KookaS) and [@vcaen](https://github.com/vcaen)."
msgstr ""
#: src/running-the-course/translations.md:18
msgid ""
"[German](https://google.github.io/comprehensive-rust/de/) by [@Throvn]"
"(https://github.com/Throvn) and [@ronaldfw](https://github.com/ronaldfw)."
msgstr ""
#: src/running-the-course/translations.md:19
msgid ""
"[Japanese](https://google.github.io/comprehensive-rust/ja/) by [@CoinEZ-JPN]"
"(https://github.com/CoinEZ) and [@momotaro1105](https://github.com/"
"momotaro1105)."
msgstr ""
#: src/running-the-course/translations.md:21
msgid ""
"If you want to help with this effort, please see [our instructions](https://"
"github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) for how to "
"get going. Translations are coordinated on the [issue tracker](https://"
"github.com/google/comprehensive-rust/issues/282)."
msgstr ""
"Si quieres ayudar en esta iniciativa, consulta [nuestras instrucciones]"
"(https://github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md) "
"para empezar. Las traducciones se coordinan en la [herramienta de "
"seguimiento de incidencias](https://github.com/google/comprehensive-rust/"
"issues/282)."
#: src/cargo.md:3
msgid ""
"When you start reading about Rust, you will soon meet [Cargo](https://doc."
"rust-lang.org/cargo/), the standard tool used in the Rust ecosystem to build "
"and run Rust applications. Here we want to give a brief overview of what "
"Cargo is and how it fits into the wider ecosystem and how it fits into this "
"training."
msgstr ""
"Cuando empieces a informarte sobre Rust, conocerás [Cargo](https://doc.rust-"
"lang.org/cargo/), la herramienta estándar que se utiliza en el ecosistema de "
"Rust para crear y ejecutar sus aplicaciones. En este artículo, te ofrecemos "
"una breve descripción de lo que es Cargo, cómo se integra en el ecosistema "
"más amplio y cómo encaja en esta formación."
#: src/cargo.md:8
msgid "Installation"
msgstr "Instalación"
#: src/cargo.md:10
msgid "**Please follow the instructions on .**"
msgstr "**Sigue las instrucciones que se indican en .**"
#: src/cargo.md:12
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 "
"use to install/switch toolchains, setup cross compilation, etc."
msgstr ""
"De este modo, obtendrás la herramienta de compilación de Cargo (`cargo`) y "
"el compilador de Rust (`rustc`). También obtendrás `rustup`, una utilidad de "
"línea de comandos que puedes utilizar para instalar o cambiar cadenas de "
"herramientas, configurar la compilación cruzada, etc."
#: 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 "
"gets you an outdated rust version and may lead to unexpected behavior. The "
"command would be:"
msgstr ""
"En Debian o Ubuntu, también puedes instalar Cargo, el código fuente de Rust "
"y [el formateador de Rust](https://github.com/rust-lang/rustfmt) a través de "
"`apt`. Sin embargo, solo podrás conseguir una versión de Rust obsoleta que "
"podría dar lugar a comportamientos inesperados. El comando es el siguiente:"
#: src/cargo.md:18
msgid ""
"```shell\n"
"sudo apt install cargo rust-src rustfmt\n"
"```"
msgstr ""
"```shell\n"
"sudo apt install cargo rust-src rustfmt\n"
"```"
#: 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-"
"analyzer.github.io/))."
msgstr ""
"Recomendamos usar [VS Code](https://code.visualstudio.com/) para editar el "
"código (aunque cualquier editor compatible con LSP funciona con [rust-"
"analyzer](https://rust-analyzer.github.io/))."
#: src/cargo.md:24
msgid ""
"Some folks also like to use the [JetBrains](https://www.jetbrains.com/"
"clion/) family of IDEs, which do their own analysis but have their own "
"tradeoffs. If you prefer them, you can install the [Rust Plugin](https://www."
"jetbrains.com/rust/). Please take note that as of January 2023 debugging "
"only works on the CLion version of the JetBrains IDEA suite."
msgstr ""
"A algunos compañeros también les gusta usar la familia [JetBrains](https://"
"www.jetbrains.com/clion/) de IDEs, que hacen sus propios análisis, pero "
"también tienen inconvenientes. Si lo prefieres, puedes instalar el [Rust "
"Plugin](https://www.jetbrains.com/rust/). Ten en cuenta que, a partir de "
"enero del 2023, la depuración solo funciona en la versión CLion del paquete "
"de JetBrains IDEA."
#: src/cargo/rust-ecosystem.md:1
msgid "The Rust Ecosystem"
msgstr "El ecosistema de Rust"
#: src/cargo/rust-ecosystem.md:3
msgid ""
"The Rust ecosystem consists of a number of tools, of which the main ones are:"
msgstr ""
"El ecosistema de Rust se compone de varias herramientas, entre las que se "
"incluyen las siguientes:"
#: src/cargo/rust-ecosystem.md:5
msgid ""
"`rustc`: the Rust compiler which turns `.rs` files into binaries and other "
"intermediate formats."
msgstr ""
"`rustc`: el compilador de Rust que convierte archivos `.rs` en binarios y "
"otros formatos intermedios."
#: 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 "
"pass them to `rustc` when building your project. Cargo also comes with a "
"built-in test runner which is used to execute unit tests."
msgstr ""
"`cargo`: herramienta de compilación y gestión de dependencias de Rust. Cargo "
"sabe cómo descargar dependencias, que normalmente se alojan en , y las transfiere a `rustc` al crear el proyecto. Cargo también "
"incorpora un ejecutor de pruebas que se utiliza para realizar pruebas "
"unitarias."
#: src/cargo/rust-ecosystem.md:13
msgid ""
"`rustup`: the Rust toolchain installer and updater. This tool is used to "
"install and update `rustc` and `cargo` when new versions of Rust is "
"released. In addition, `rustup` can also download documentation for the "
"standard library. You can have multiple versions of Rust installed at once "
"and `rustup` will let you switch between them as needed."
msgstr ""
"`rustup`: el instalador y actualizador de cadenas de herramientas de Rust. "
"Esta herramienta se utiliza para instalar y actualizar `rustc` y `cargo` "
"cuando se lanzan nuevas versiones de Rust. Además, `rustup` también puede "
"descargar documentación de la biblioteca estándar. Puedes tener varias "
"versiones de Rust instaladas a la vez y `rustup` te permitirá cambiar de una "
"a otra según lo necesites."
#: src/cargo/rust-ecosystem.md:21 src/hello-world.md:25
#: src/hello-world/small-example.md:27 src/why-rust/runtime.md:10
#: src/why-rust/modern.md:21 src/basic-syntax/compound-types.md:30
#: src/basic-syntax/references.md:23
#: src/pattern-matching/destructuring-enums.md:35
#: src/ownership/double-free-modern-cpp.md:55
#: src/error-handling/try-operator.md:48
#: src/error-handling/converting-error-types-example.md:50
#: src/concurrency/threads.md:30 src/async/async-await.md:25
msgid "Key points:"
msgstr "Puntos clave:"
#: src/cargo/rust-ecosystem.md:23
msgid ""
"Rust has a rapid release schedule with a new release coming out every six "
"weeks. New releases maintain backwards compatibility with old releases --- "
"plus they enable new functionality."
msgstr ""
"Rust cuenta con un programa de lanzamiento rápido en el que se publica una "
"nueva versión cada seis semanas. Las nuevas versiones mantienen la "
"retrocompatibilidad con las versiones anteriores, además de habilitar nuevas "
"funciones."
#: src/cargo/rust-ecosystem.md:27
msgid ""
"There are three release channels: \"stable\", \"beta\", and \"nightly\"."
msgstr "Hay tres canales de lanzamiento: \"stable\", \"beta\" y \"nightly\"."
#: src/cargo/rust-ecosystem.md:29
msgid ""
"New features are being tested on \"nightly\", \"beta\" is what becomes "
"\"stable\" every six weeks."
msgstr ""
"Las funciones nuevas se prueban en \"nightly\", y \"beta\" es lo que se "
"convierte en \"estable\" cada seis semanas."
#: src/cargo/rust-ecosystem.md:32
msgid ""
"Dependencies can also be resolved from alternative [registries](https://doc."
"rust-lang.org/cargo/reference/registries.html), git, folders, and more."
msgstr ""
"Las dependencias también pueden resolverse desde \\[registros\\] "
"alternativos, git, carpetas, etc."
#: src/cargo/rust-ecosystem.md:34
msgid ""
"Rust also has [editions](https://doc.rust-lang.org/edition-guide/): the "
"current edition is Rust 2021. Previous editions were Rust 2015 and Rust 2018."
msgstr ""
"Rust también tiene varias \\[ediciones\\]: la más actual es Rust 2021. Las "
"ediciones anteriores son Rust 2015 y Rust 2018."
#: src/cargo/rust-ecosystem.md:37
msgid ""
"The editions are allowed to make backwards incompatible changes to the "
"language."
msgstr ""
"Las ediciones pueden introducir cambios de incompatibilidad con versiones "
"anteriores en el lenguaje."
#: src/cargo/rust-ecosystem.md:40
msgid ""
"To prevent breaking code, editions are opt-in: you select the edition for "
"your crate via the `Cargo.toml` file."
msgstr ""
"Para evitar que se rompa el código, las ediciones son opcionales: selecciona "
"la edición para tu crate a través del archivo `Cargo.toml`."
#: src/cargo/rust-ecosystem.md:43
msgid ""
"To avoid splitting the ecosystem, Rust compilers can mix code written for "
"different editions."
msgstr ""
"Para evitar la división del ecosistema, los compiladores de Rust pueden "
"mezclar el código escrito para distintas ediciones."
#: src/cargo/rust-ecosystem.md:46
msgid ""
"Mention that it is quite rare to ever use the compiler directly not through "
"`cargo` (most users never do)."
msgstr ""
"Hay que mencionar que es bastante raro utilizar el compilador directamente y "
"no a través de `cargo` (la mayoría de los usuarios nunca lo hacen)."
#: src/cargo/rust-ecosystem.md:48
msgid ""
"It might be worth alluding that Cargo itself is an extremely powerful and "
"comprehensive tool. It is capable of many advanced features including but "
"not limited to: "
msgstr ""
"Vale la pena mencionar que Cargo en sí es una herramienta extremadamente "
"poderosa e integral. Es capaz de hacer muchas cosas avanzadas y no "
"limitadas a: "
#: src/cargo/rust-ecosystem.md:49
msgid "Project/package structure"
msgstr "Estructura del proyecto/package "
#: src/cargo/rust-ecosystem.md:50
msgid "[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html)"
msgstr ""
"[workspaces](https://doc.rust-lang.org/cargo/reference/workspaces.html) "
#: src/cargo/rust-ecosystem.md:51
msgid "Dev Dependencies and Runtime Dependency management/caching"
msgstr "Manejo/Caché de Dependencias de Desarrollo y de Runtime "
#: src/cargo/rust-ecosystem.md:52
msgid ""
"[build scripting](https://doc.rust-lang.org/cargo/reference/build-scripts."
"html)"
msgstr ""
"Consulta el libro [Rust Reference](https://doc.rust-lang.org/reference/type-"
"layout.html)."
#: src/cargo/rust-ecosystem.md:53
msgid ""
"[global installation](https://doc.rust-lang.org/cargo/commands/cargo-install."
"html)"
msgstr ""
#: src/cargo/rust-ecosystem.md:54
msgid ""
"It is also extensible with sub command plugins as well (such as [cargo "
"clippy](https://github.com/rust-lang/rust-clippy))."
msgstr "Consulta más información en el \\[libro oficial de Cargo\\]."
#: src/cargo/rust-ecosystem.md:55
msgid ""
"Read more from the [official Cargo Book](https://doc.rust-lang.org/cargo/)"
msgstr ""
#: src/cargo/code-samples.md:1
msgid "Code Samples in This Training"
msgstr "Código de ejemplo en esta formación"
#: src/cargo/code-samples.md:3
msgid ""
"For this training, we will mostly explore the Rust language through examples "
"which can be executed through your browser. This makes the setup much easier "
"and ensures a consistent experience for everyone."
msgstr ""
"En esta formación, aprenderemos el lenguaje Rust principalmente con ejemplos "
"que podrás ejecutar con tu navegador. De este modo, la configuración es "
"mucho más sencilla y se asegura una experiencia homogénea para todos."
#: src/cargo/code-samples.md:7
msgid ""
"Installing Cargo is still encouraged: it will make it easier for you to do "
"the exercises. On the last day, we will do a larger exercise which shows you "
"how to work with dependencies and for that you need Cargo."
msgstr ""
"Se recomienda instalar Cargo, ya que facilitará la realización de los "
"ejercicios. El último día realizaremos un ejercicio más largo en el que se "
"mostrará cómo trabajar con dependencias, y para eso se necesita Cargo."
#: src/cargo/code-samples.md:11
msgid "The code blocks in this course are fully interactive:"
msgstr "Los bloques de código de este curso son totalmente interactivos:"
#: src/cargo/code-samples.md:13
msgid ""
"```rust,editable\n"
"fn main() {\n"
" println!(\"Edit me!\");\n"
"}\n"
"```"
msgstr ""
"```rust,editable\n"
"fn main() {\n"
" println!(\"Edit me!\");\n"
"}\n"
"```"
#: src/cargo/code-samples.md:19
msgid "You can use "
msgstr "Puedes usar "
#: src/cargo/code-samples.md:19
msgid " to execute the code when focus is in the text box."
msgstr " para ejecutar el código cuando el cursor esté en el cuadro de texto."
#: src/cargo/code-samples.md:24
msgid ""
"Most code samples are editable like shown above. A few code samples are not "
"editable for various reasons:"
msgstr ""
"La mayoría de los códigos de ejemplo se pueden editar, como se muestra "
"arriba, pero hay algunos que no se pueden editar por varios motivos:"
#: src/cargo/code-samples.md:27
msgid ""
"The embedded playgrounds cannot execute unit tests. Copy-paste the code and "
"open it in the real Playground to demonstrate unit tests."
msgstr ""
"Los playgrounds insertados no pueden ejecutar pruebas unitarias. Copia y "
"pega el código y ábrelo en la página del playground para mostrar pruebas "
"unitarias."
#: src/cargo/code-samples.md:30
msgid ""
"The embedded playgrounds lose their state the moment you navigate away from "
"the page! This is the reason that the students should solve the exercises "
"using a local Rust installation or via the Playground."
msgstr ""
"Los playgrounds insertados pierden su estado en cuanto sales e de la página. "
"Por este motivo, los alumnos deben resolver los ejercicios con una versión "
"local de Rust o a través del playground."
#: src/cargo/running-locally.md:1
msgid "Running Code Locally with Cargo"
msgstr "Ejecutar código de forma local con Cargo"
#: src/cargo/running-locally.md:3
#, fuzzy
msgid ""
"If you want to experiment with the code on your own system, then you will "
"need to first install Rust. Do this by following the [instructions in the "
"Rust Book](https://doc.rust-lang.org/book/ch01-01-installation.html). This "
"should give you a working `rustc` and `cargo`. At the time of writing, the "
"latest stable Rust release has these version numbers:"
msgstr ""
"Si quieres experimentar con el código en tu propio sistema, primero tendrás "
"que instalar Rust. Para ello, sigue las \\[instrucciones que aparecen en el "
"libro de Rust\\]\\[1\\]. De este modo, obtendrás un `rustc` y un `cargo` que "
"funcionen. En el momento en que se redactó este documento, los números de "
"las últimas versiones estables de Rust eran los siguientes:"
#: src/cargo/running-locally.md:8
msgid ""
"```shell\n"
"% rustc --version\n"
"rustc 1.69.0 (84c898d65 2023-04-16)\n"
"% cargo --version\n"
"cargo 1.69.0 (6e9a83356 2023-04-12)\n"
"```"
msgstr ""
"```shell\n"
"% rustc --version\n"
"rustc 1.69.0 (84c898d65 2023-04-16)\n"
"% cargo --version\n"
"cargo 1.69.0 (6e9a83356 2023-04-12)\n"
"```"
#: src/cargo/running-locally.md:15
msgid ""
"You can use any later version too since Rust maintains backwards "
"compatibility."
msgstr ""
#: src/cargo/running-locally.md:17
msgid ""
"With this in place, follow these steps to build a Rust binary from one of "
"the examples in this training:"
msgstr ""
"Una vez hecho lo anterior, sigue estos pasos para compilar un binario de "
"Rust a partir de uno de los ejemplos de la formación:"
#: src/cargo/running-locally.md:20
msgid "Click the \"Copy to clipboard\" button on the example you want to copy."
msgstr ""
"Haz clic en el botón \"Copiar en el portapapeles\" del ejemplo que quieras "
"copiar."
#: src/cargo/running-locally.md:22
msgid ""
"Use `cargo new exercise` to create a new `exercise/` directory for your code:"
msgstr ""
"Usa `cargo new exercise` para crear un directorio `exercise/` para tu código:"
#: src/cargo/running-locally.md:24
msgid ""
"```shell\n"
"$ cargo new exercise\n"
" Created binary (application) `exercise` package\n"
"```"
msgstr ""
"```shell\n"
"$ cargo new exercise\n"
" Created binary (application) `exercise` package\n"
"```"
#: src/cargo/running-locally.md:29
msgid ""
"Navigate into `exercise/` and use `cargo run` to build and run your binary:"
msgstr ""
"Ve a `exercise/` y usa `cargo run` para compilar y ejecutar tu binario:"
#: src/cargo/running-locally.md:31
msgid ""
"```shell\n"
"$ cd exercise\n"
"$ cargo run\n"
" Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\n"
" Finished dev [unoptimized + debuginfo] target(s) in 0.75s\n"
" Running `target/debug/exercise`\n"
"Hello, world!\n"
"```"
msgstr ""
"```shell\n"
"$ cd exercise\n"
"$ cargo run\n"
" Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\n"
" Finished dev [unoptimized + debuginfo] target(s) in 0.75s\n"
" Running `target/debug/exercise`\n"
"Hola Mundo!\n"
"```"
#: src/cargo/running-locally.md:40
msgid ""
"Replace the boiler-plate code in `src/main.rs` with your own code. For "
"example, using the example on the previous page, make `src/main.rs` look like"
msgstr ""
"Sustituye el código de plantilla en `src/main.rs` con tu propio código. Por "
"ejemplo, si usamos el ejemplo de la página anterior, podemos hacer que `src/"
"main.rs` tenga el siguiente aspecto:"
#: src/cargo/running-locally.md:43
msgid ""
"```rust\n"
"fn main() {\n"
" println!(\"Edit me!\");\n"
"}\n"
"```"
msgstr ""
"```rust\n"
"fn main() {\n"
" println!(\"Edit me!\");\n"
"}\n"
"```"
#: src/cargo/running-locally.md:49
msgid "Use `cargo run` to build and run your updated binary:"
msgstr "Usa `cargo run` para hacer build y ejecutar tu binario actualizado:"
#: src/cargo/running-locally.md:51
msgid ""
"```shell\n"
"$ cargo run\n"
" Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\n"
" Finished dev [unoptimized + debuginfo] target(s) in 0.24s\n"
" Running `target/debug/exercise`\n"
"Edit me!\n"
"```"
msgstr ""
"```shell\n"
"$ cargo run\n"
" Compiling exercise v0.1.0 (/home/mgeisler/tmp/exercise)\n"
" Finished dev [unoptimized + debuginfo] target(s) in 0.24s\n"
" Running `target/debug/ejercicio`\n"
"Modifícame!\n"
"```"
#: src/cargo/running-locally.md:59
msgid ""
"Use `cargo check` to quickly check your project for errors, use `cargo "
"build` to compile it without running it. You will find the output in `target/"
"debug/` for a normal debug build. Use `cargo build --release` to produce an "
"optimized release build in `target/release/`."
msgstr ""
"Comprueba que no haya errores en el proyecto con `cargo check`. Compílalo "
"sin ejecutarlo con `cargo build`. Encontrarás la salida en `target/debug/` "
"para una versión de depuración normal. Usa `cargo build --release` para "
"generar una compilación de lanzamiento optimizada en `target/release/`."
#: src/cargo/running-locally.md:64
msgid ""
"You can add dependencies for your project by editing `Cargo.toml`. When you "
"run `cargo` commands, it will automatically download and compile missing "
"dependencies for you."
msgstr ""
"Edita `Cargo.toml` para añadir dependencias a tu proyecto. Cuando ejecutes "
"comandos `cargo`, se descargarán y compilarán automáticamente las "
"dependencias que falten."
#: src/cargo/running-locally.md:72
msgid ""
"Try to encourage the class participants to install Cargo and use a local "
"editor. It will make their life easier since they will have a normal "
"development environment."
msgstr ""
"Anima a los participantes de la clase a instalar Cargo y utilizar un editor "
"local. Les facilitará mucho las cosas, ya que dispondrán de un entorno de "
"desarrollo normal."
#: src/welcome-day-1.md:1
msgid "Welcome to Day 1"
msgstr "Te damos la bienvenida al Día 1"
#: src/welcome-day-1.md:3
#, fuzzy
msgid ""
"This is the first day of Rust Fundamentals. We will cover a lot of ground "
"today:"
msgstr ""
"Este es el primer día de Comprehensive Rust. Hoy trataremos muchos temas:"
#: src/welcome-day-1.md:6
msgid ""
"Basic Rust syntax: variables, scalar and compound types, enums, structs, "
"references, functions, and methods."
msgstr ""
"Sintaxis básica Rust: variables, scalar y tipos compuestos, enums, structs, "
"references, funciones, y métodos."
#: src/welcome-day-1.md:9
msgid ""
"Control flow constructs: `if`, `if let`, `while`, `while let`, `break`, and "
"`continue`."
msgstr ""
"Control de flujo: `if`, `if let`, `while`, `while let`, `break`, y "
"`continue`."
#: src/welcome-day-1.md:12
msgid "Pattern matching: destructuring enums, structs, and arrays."
msgstr ""
#: src/welcome-day-1.md:16
msgid "Please remind the students that:"
msgstr "Recuerda a los alumnos lo siguiente:"
#: src/welcome-day-1.md:18
msgid ""
"They should ask questions when they get them, don't save them to the end."
msgstr ""
"Deben hacer las preguntas cuando surgen, no las guarden hasta el final."
#: src/welcome-day-1.md:19
msgid ""
"The class is meant to be interactive and discussions are very much "
"encouraged!"
msgstr ""
"El curso está pensado para ser muy interactivo, por lo que te recomendamos "
"que dejes que las preguntas guíen el aprendizaje de Rust."
#: src/welcome-day-1.md:20
msgid ""
"As an instructor, you should try to keep the discussions relevant, i.e., "
"keep the discussions related to how Rust does things vs some other "
"language. It can be hard to find the right balance, but err on the side of "
"allowing discussions since they engage people much more than one-way "
"communication."
msgstr ""
"Como instructor, debes intentar llevar discusiones relevantes, por ejemplo, "
"mantener relación de cómo Rust hace las cosas vs otros lenguajes. Puede "
"costar encontrar un balance adecuado, pero permite llevar un debate que "
"atraiga la atención de la gente por sobre un discurso unidireccional."
#: src/welcome-day-1.md:24
msgid ""
"The questions will likely mean that we talk about things ahead of the slides."
msgstr ""
"Las preguntas deberían ser sobre cosas acerca del contenido de los slides."
#: src/welcome-day-1.md:25
msgid ""
"This is perfectly okay! Repetition is an important part of learning. "
"Remember that the slides are just a support and you are free to skip them as "
"you like."
msgstr ""
"Esto está perfecto! Repetir es una parte importante del aprendizaje. "
"Recuerda que los slides son solo un soporte y tienes libertad de saltearlos "
"cuando quieras."
#: src/welcome-day-1.md:29
msgid ""
"The idea for the first day is to show _just enough_ of Rust to be able to "
"speak about the famous borrow checker. The way Rust handles memory is a "
"major feature and we should show students this right away."
msgstr ""
"La idea del primer día es mostrar _lo suficiente_ de Rustcomo para poder "
"hablar del famoso _borrow checker_. La forma en que Rust gestiona la memoria "
"es una característica importante y debemos mostrarla a los estudiantes desde "
"el principio."
#: 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 ""
"Si estás impartiendo el curso en un aula, este es un buen lugar para repasar "
"el calendario. Te recomendamos que dividas el día en dos partes (siguiendo "
"las diapositivas):"
#: src/welcome-day-1.md:36
msgid "Morning: 9:00 to 12:00,"
msgstr "Mañana: 9:00 to 12:00,"
#: src/welcome-day-1.md:37
msgid "Afternoon: 13:00 to 16:00."
msgstr "Tarde: de 13:00 a 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 ""
"Por supuesto, puedes ajustar las horas según lo necesites. No olvides "
"incluir pausas, recomendamos hacer un descanso cada hora."
#: 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 es un nuevo lenguaje de programación que lanzó su versión [1.0 en el "
"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 es un lenguaje compilado estático similar a C++"
#: src/welcome-day-1/what-is-rust.md:6
msgid "`rustc` uses LLVM as its backend."
msgstr "`rustc` usa LLVM como backend."
#: 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 es compatible con muchas [plataformas y arquitecturas](https://doc.rust-"
"lang.org/nightly/rustc/platform-support.html):"
#: src/welcome-day-1/what-is-rust.md:9
msgid "x86, ARM, WebAssembly, ..."
msgstr "x86, ARM, WebAssembly, ..."
#: src/welcome-day-1/what-is-rust.md:10
msgid "Linux, Mac, Windows, ..."
msgstr "Linux, Mac, Windows, ..."
#: src/welcome-day-1/what-is-rust.md:11
msgid "Rust is used for a wide range of devices:"
msgstr "Rust se utiliza en una gran variedad de dispositivos:"
#: src/welcome-day-1/what-is-rust.md:12
msgid "firmware and boot loaders,"
msgstr "firmware y cargadores de inicio,"
#: src/welcome-day-1/what-is-rust.md:13
msgid "smart displays,"
msgstr "pantallas inteligentes,"
#: src/welcome-day-1/what-is-rust.md:14
msgid "mobile phones,"
msgstr "teléfonos móviles,"
#: src/welcome-day-1/what-is-rust.md:15
msgid "desktops,"
msgstr "ordenadores,"
#: src/welcome-day-1/what-is-rust.md:16
msgid "servers."
msgstr "servidores."
#: src/welcome-day-1/what-is-rust.md:21
msgid "Rust fits in the same area as C++:"
msgstr "Rust satisface las mismas necesidades que C++:"
#: src/welcome-day-1/what-is-rust.md:23
msgid "High flexibility."
msgstr "Gran flexibilidad."
#: src/welcome-day-1/what-is-rust.md:24
msgid "High level of control."
msgstr "Nivel alto de control."
#: src/welcome-day-1/what-is-rust.md:25
msgid ""
"Can be scaled down to very constrained devices such as microcontrollers."
msgstr ""
"Se puede reducir verticalmente a dispositivos muy limitados, como los "
"microcontroladores."
#: src/welcome-day-1/what-is-rust.md:26
msgid "Has no runtime or garbage collection."
msgstr "No tiene _runtime_ ni _garbage collection_."
#: src/welcome-day-1/what-is-rust.md:27
msgid "Focuses on reliability and safety without sacrificing performance."
msgstr ""
"Se centra en la fiabilidad y la seguridad sin sacrificar el rendimiento."
#: src/hello-world.md:3
msgid ""
"Let us jump into the simplest possible Rust program, a classic Hello World "
"program:"
msgstr "Vamos a hablar del programa Rust más simple, un clásico Hola Mundo:"
#: src/hello-world.md:6
msgid ""
"```rust,editable\n"
"fn main() {\n"
" println!(\"Hello 🌍!\");\n"
"}\n"
"```"
msgstr ""
"```rust,editable\n"
"fn main() {\n"
" println!(\"Hola 🌍!\");\n"
"}\n"
"```"
#: src/hello-world.md:12
msgid "What you see:"
msgstr "Lo que ves:"
#: src/hello-world.md:14
msgid "Functions are introduced with `fn`."
msgstr "Las funciones se introducen con `fn`."
#: src/hello-world.md:15
msgid "Blocks are delimited by curly braces like in C and C++."
msgstr "Los bloques se delimitan con llaves, como en C y C++."
#: src/hello-world.md:16
msgid "The `main` function is the entry point of the program."
msgstr "La función `main` es el punto de entrada del programa."
#: src/hello-world.md:17
msgid "Rust has hygienic macros, `println!` is an example of this."
msgstr "Rust tiene macros higiénicas, como por ejemplo `println!`."
#: src/hello-world.md:18
msgid "Rust strings are UTF-8 encoded and can contain any Unicode character."
msgstr ""
"Las cadenas de Rust están codificadas en UTF-8 y pueden contener caracteres "
"Unicode."
#: src/hello-world.md:22
msgid ""
"This slide tries to make the students comfortable with Rust code. They will "
"see a ton of it over the next three days so we start small with something "
"familiar."
msgstr ""
"Con esta diapositiva se intenta que los alumnos se sientan cómodos con el "
"código de Rust. En los próximos tres días lo verán mucho, así que "
"empezaremos con algo que ya conocemos."
#: 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 es muy similar a otros lenguajes, como C, C++ o Java. Es imperativo y "
"no intenta reinventar las cosas a menos que sea absolutamente necesario."
#: src/hello-world.md:31
msgid "Rust is modern with full support for things like Unicode."
msgstr "Rust es moderno y totalmente compatible con sistemas como 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 utiliza macros en situaciones en las que se desea tener un número "
"variable de argumentos (sin [sobrecarga](basic-syntax/functions-interlude."
"md) de funciones)."
#: src/hello-world.md:36
msgid ""
"Macros being 'hygienic' means they don't accidentally capture identifiers "
"from the scope they are used in. Rust macros are actually only [partially "
"hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene."
"html)."
msgstr ""
"Que las macros sean 'higiénicas' significa que no capturan "
"accidentalmenteidentificadores del ámbito en el que se utilizan. En "
"realidad, las macros de Rust solo son [parcialmente higiénicas](https://"
"veykril.github.io/tlborm/decl-macros/minutiae/hygiene.html)."
#: src/hello-world.md:40
msgid ""
"Rust is multi-paradigm. For example, it has powerful [object-oriented "
"programming features](https://doc.rust-lang.org/book/ch17-00-oop.html), and, "
"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 ""
"Rust es un lenguaje multiparadigma. Por ejemplo, cuenta con [funciones de "
"programación orientadas a objetos](https://doc.rust-lang.org/book/ch17-00-"
"oop.html) y, aunque no es un lenguaje funcional, incluye una serie de "
"[conceptos funcionales](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 "A continuación, se muestra un pequeño programa de ejemplo de Rust:"
#: src/hello-world/small-example.md:5
msgid ""
"```rust,editable\n"
"fn main() { // Program entry point\n"
" let mut x: i32 = 6; // Mutable variable binding\n"
" print!(\"{x}\"); // Macro for printing, like printf\n"
" while x != 1 { // No parenthesis around expression\n"
" if x % 2 == 0 { // Math like in other languages\n"
" x = x / 2;\n"
" } else {\n"
" x = 3 * x + 1;\n"
" }\n"
" print!(\" -> {x}\");\n"
" }\n"
" println!();\n"
"}\n"
"```"
msgstr ""
"```rust,editable\n"
"fn main() { // Punto de entrada del programa\n"
" let mut x: i32 = 6; // Variable mutable vinculante\n"
" print!(\"{x}\"); // Macro para printing, como printf\n"
" while x != 1 { // Sin paréntesis alrededor de las expresiones\n"
" if x % 2 == 0 { // Operaciones matemáticas como en otros lenguajes\n"
" x = x / 2;\n"
" } else {\n"
" x = 3 * x + 1;\n"
" }\n"
" print!(\" -> {x}\");\n"
" }\n"
" println!();\n"
"}\n"
"```"
#: src/hello-world/small-example.md:23
msgid ""
"The code implements the Collatz conjecture: it is believed that the loop "
"will always end, but this is not yet proved. Edit the code and play with "
"different inputs."
msgstr ""
"El código implementa la conjetura de Collatz: se cree que el bucle terminará "
"siempre, pero aún no se ha demostrado. Edita el código y prueba con "
"diferentes entradas."
#: src/hello-world/small-example.md:29
msgid ""
"Explain that all variables are statically typed. Try removing `i32` to "
"trigger type inference. Try with `i8` instead and trigger a runtime integer "
"overflow."
msgstr ""
"Explica que todas las variables están tipadas estáticamente. Prueba a quitar "
"`i32` para activar la inferencia de tipos. Prueba con `i8` y provoca un "
"desbordamiento de enteros en _runtime_."
#: src/hello-world/small-example.md:32
msgid "Change `let mut x` to `let x`, discuss the compiler error."
msgstr "Cambia `let mut x` por `let x` y discute el error del compilador."
#: 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 ""
"Muestra cómo `print!` da un error de compilación si los argumentos no "
"coinciden con la cadena de formato."
#: 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 ""
"Muestra cómo se debe usar `{}` como marcador de posición para poder imprimir "
"una expresión más compleja que una sola variable."
#: src/hello-world/small-example.md:40
msgid ""
"Show the students the standard library, show them how to search for `std::"
"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 ""
"Muestra a los alumnos la biblioteca estándar y cómo buscar `std::fmt`, que "
"tiene las reglas del mini-lenguaje de formato. Es importante que los alumnos "
"se familiaricen con la búsqueda en la biblioteca estándar."
#: 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 ""
"En un shell, `rustup doc std::fmt` abrirá un navegador en la documentación "
"local de std::fmt."
#: src/why-rust.md:3
msgid "Some unique selling points of Rust:"
msgstr "Estas son algunas de las ventajas competitivas de Rust:"
#: src/why-rust.md:5
msgid "Compile time memory safety."
msgstr "Seguridad de la memoria en tiempo de compilación."
#: src/why-rust.md:6
msgid "Lack of undefined runtime behavior."
msgstr "Ausencia de comportamientos indefinidos en _runtime_."
#: src/why-rust.md:7
msgid "Modern language features."
msgstr "Características de lenguajes modernos."
#: 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 ""
"Asegúrate de preguntar a la clase en qué lenguajes tienen experiencia. "
"Dependiendo de la respuesta puedes destacar diferentes características de "
"Rust:"
#: src/why-rust.md:14
msgid ""
"Experience with C or C++: Rust eliminates a whole class of _runtime errors_ "
"via the borrow checker. You get performance like in C and C++, but you don't "
"have the memory unsafety issues. In addition, you get a modern language with "
"constructs like pattern matching and built-in dependency management."
msgstr ""
"Experiencia con C o C++: Rust elimina una clase completa de _errores de "
"runtime_ mediante el _borrow checker_. Obtienes un rendimiento similar al de "
"C y C++, pero no tienes problemas de seguridad en la memoria. Además, "
"obtienes un lenguaje moderno con elementos como la coincidencia de patrones "
"y la gestión de dependencias integrado."
#: src/why-rust.md:19
msgid ""
"Experience with Java, Go, Python, JavaScript...: You get the same memory "
"safety as in those languages, plus a similar high-level language feeling. In "
"addition you get fast and predictable performance like C and C++ (no garbage "
"collector) as well as access to low-level hardware (should you need it)"
msgstr ""
"Experiencia con Java, Go, Python, JavaScript, etc.: Consigues la misma "
"seguridad en la memoria que en éstos lenguajes, además de una sensación "
"similar a la de un lenguaje de alto nivel. También consigues un rendimiento "
"rápido y predecible como en C y C++ (sin recolector de memoria residual), "
"así como acceso a hardware de bajo nivel (si lo necesitas)."
#: src/why-rust/compile-time.md:3
msgid "Static memory management at compile time:"
msgstr "Gestión estática de la memoria en tiempo de compilación:"
#: src/why-rust/compile-time.md:5
msgid "No uninitialized variables."
msgstr "No hay variables no inicializadas."
#: src/why-rust/compile-time.md:6
msgid "No memory leaks (_mostly_, see notes)."
msgstr "No hay pérdidas de memoria (_casi siempre_, consulta las notas)."
#: src/why-rust/compile-time.md:7
msgid "No double-frees."
msgstr "No hay errores double free."
#: src/why-rust/compile-time.md:8
msgid "No use-after-free."
msgstr "No hay errores use-after-free."
#: src/why-rust/compile-time.md:9
msgid "No `NULL` pointers."
msgstr "No hay punteros `NULL`."
#: src/why-rust/compile-time.md:10
msgid "No forgotten locked mutexes."
msgstr "No se olvidan las exclusiones mutuas bloqueadas."
#: src/why-rust/compile-time.md:11
msgid "No data races between threads."
msgstr "No hay condiciones de carrera de datos entre hilos."
#: src/why-rust/compile-time.md:12
msgid "No iterator invalidation."
msgstr "No se invalidan los iteradores."
#: src/why-rust/compile-time.md:16
msgid ""
"It is possible to produce memory leaks in (safe) Rust. Some examples are:"
msgstr ""
"Es posible producir pérdidas de memoria en (_safe_) Rust. Estos son algunos "
"ejemplos:"
#: src/why-rust/compile-time.md:19
msgid ""
"You can use [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box."
"html#method.leak) to leak a pointer. A use of this could be to get runtime-"
"initialized and runtime-sized static variables"
msgstr ""
"Puedes usar [`Box::leak`](https://doc.rust-lang.org/std/boxed/struct.Box."
"html#method.leak) para perder un puntero. Esto podría usarse para obtener "
"variables estáticas iniciadas y medidas en _runtime_."
#: src/why-rust/compile-time.md:21
msgid ""
"You can use [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.forget."
"html) to make the compiler \"forget\" about a value (meaning the destructor "
"is never run)."
msgstr ""
"Puedes usar [`std::mem::forget`](https://doc.rust-lang.org/std/mem/fn.forget."
"html) para que el compilador \"olvide\" un valor (lo que significa que el "
"destructor nunca se ejecuta)."
#: 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 ""
"También puedes crear por accidente una [referencia circular](https://doc."
"rust-lang.org/book/ch15-06-reference-cycles.html) con `Rc` o `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 ""
"De hecho, algunos consideran que poblar de forma infinita una colección es "
"una fuga de memoria y Rust no protege de ellas."
#: 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 ""
"En este curso, \"sin pérdidas de memoria\" debe entenderse como\n"
" \"casi ninguna pérdida de memoria _accidental_\"."
#: src/why-rust/runtime.md:3
msgid "No undefined behavior at runtime:"
msgstr "No hay comportamientos indefinidos en _runtime_:"
#: src/why-rust/runtime.md:5
msgid "Array access is bounds checked."
msgstr "Se comprueban los límites de acceso a los arrays."
#: src/why-rust/runtime.md:6
msgid "Integer overflow is defined (panic or wrap-around)."
msgstr "Se define el desbordamiento de enteros (_panic_ o _wrap-around_)."
#: src/why-rust/runtime.md:12
msgid ""
"Integer overflow is defined via the [`overflow-checks`](https://doc.rust-"
"lang.org/rustc/codegen-options/index.html#overflow-checks) compile-time "
"flag. If enabled, the program will panic (a controlled crash of the "
"program), otherwise you get wrap-around semantics. By default, you get "
"panics in debug mode (`cargo build`) and wrap-around in release mode (`cargo "
"build --release`)."
msgstr ""
"El overflow en Integer es definido vía un _flag_ en tiempo de compilación. "
"Las opciones son alertas panic (un crash controlado del programa) o una "
"semántica de _wrap-around_. Por defecto, obtienes el alerta en modo "
"depuración (`cargo build`) y _wrap-around_ en el modo release (`cargo build —"
#: src/why-rust/runtime.md:18
msgid ""
"Bounds checking cannot be disabled with a compiler flag. It can also not be "
"disabled directly with the `unsafe` keyword. However, `unsafe` allows you to "
"call functions such as `slice::get_unchecked` which does not do bounds "
"checking."
msgstr ""
"La comprobación de límites no se puede deshabilitar con una bandera de "
"compilador. Tampoco se puede inhabilitar directamente con la palabra clave "
"`unsafe`. Sin embargo, `unsafe` te permite llamar a funciones como `slice::"
"get_unchecked`, que no realiza comprobaciones de límites."
#: src/why-rust/modern.md:3
msgid "Rust is built with all the experience gained in the last decades."
msgstr ""
"Rust se ha creado a partir de toda la experiencia obtenida en las últimas "
"décadas."
#: src/why-rust/modern.md:5
msgid "Language Features"
msgstr "Características del Lenguaje"
#: src/why-rust/modern.md:7
msgid "Enums and pattern matching."
msgstr "Enumeraciones (_Enums_) y coincidencia de patrones."
#: src/why-rust/modern.md:8
msgid "Generics."
msgstr "Genéricos"
#: src/why-rust/modern.md:9
msgid "No overhead FFI."
msgstr "Sin _overhead_ de FFI."
#: src/why-rust/modern.md:10
msgid "Zero-cost abstractions."
msgstr "Abstracciones sin coste."
#: src/why-rust/modern.md:12
msgid "Tooling"
msgstr "Herramientas"
#: src/why-rust/modern.md:14
msgid "Great compiler errors."
msgstr "Excelentes errores de compilación."
#: src/why-rust/modern.md:15
msgid "Built-in dependency manager."
msgstr "Gestor de dependencias integrado."
#: src/why-rust/modern.md:16
msgid "Built-in support for testing."
msgstr "Asistencia integrada para pruebas."
#: src/why-rust/modern.md:17
msgid "Excellent Language Server Protocol support."
msgstr "Compatibilidad excelente con el protocolo del servidor de lenguaje."
#: src/why-rust/modern.md:23
msgid ""
"Zero-cost abstractions, similar to C++, means that you don't have to 'pay' "
"for higher-level programming constructs with memory or CPU. For example, "
"writing a loop using `for` should result in roughly the same low level "
"instructions as using the `.iter().fold()` construct."
msgstr ""
"Las abstracciones sin coste, similares a las de C++, significan que no "
"tienes que 'pagar' por construcciones de programación de alto nivel con "
"memoria o CPU. Por ejemplo, escribir un bucle utilizando `for` debería dar "
"como resultado prácticamente las mismas instrucciones de bajo nivel que con "
"la construcción `.iter().fold()`."
#: src/why-rust/modern.md:28
msgid ""
"It may be worth mentioning that Rust enums are 'Algebraic Data Types', also "
"known as 'sum types', which allow the type system to express things like "
"`Option` and `Result`."
msgstr ""
"Merece la pena mencionar que los enums de Rust son tipos de datos "
"algebraicos, también denominados 'tipos suma', que permiten al sistema de "
"tipos expresar cosas como `Option` y `Result`."
#: src/why-rust/modern.md:32
msgid ""
"Remind people to read the errors --- many developers have gotten used to "
"ignore lengthy compiler output. The Rust compiler is significantly more "
"talkative than other compilers. It will often provide you with _actionable_ "
"feedback, ready to copy-paste into your code."
msgstr ""
"Recuerda a los alumnos que lean los errores, ya que muchos desarrolladores "
"se han acostumbrado a ignorar los largos resultados del compilador. El "
"compilador de Rust es mucho más comunicativo que otros. A menudo, te "
"proporcionará sugerencias _prácticas_, que puedes copiar y pegar en tu "
"código."
#: src/why-rust/modern.md:37
msgid ""
"The Rust standard library is small compared to languages like Java, Python, "
"and Go. Rust does not come with several things you might consider standard "
"and essential:"
msgstr ""
"La biblioteca estándar de Rust es pequeña en comparación con la de lenguajes "
"como Java, Python o Go. Rust no incluye elementos que se podrían considerar "
"estándar o esenciales:"
#: src/why-rust/modern.md:41
msgid "a random number generator, but see [rand](https://docs.rs/rand/)."
msgstr ""
"un generador de números aleatorios, pero consulta [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 ""
"compatibilidad con SSL o TLS, pero consulta [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 ""
"Compatibilidad con JSON, pero consulta [serde_json](https://docs.rs/"
"serde_json/)."
#: src/why-rust/modern.md:45
msgid ""
"The reasoning behind this is that functionality in the standard library "
"cannot go away, so it has to be very stable. For the examples above, the "
"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 ""
"La razón es que la funcionalidad de la biblioteca estándar no puede "
"desaparecer, por lo que tiene que ser muy estable. En los ejemplos "
"anteriores, la comunidad de Rust todavía está trabajando para encontrar la "
"mejor solución, y puede que no exista una única \"mejor solución\" para "
"algunas de estas cuestiones."
#: src/why-rust/modern.md:50
msgid ""
"Rust comes with a built-in package manager in the form of Cargo and this "
"makes it trivial to download and compile third-party crates. A consequence "
"of this is that the standard library can be smaller."
msgstr ""
"Rust incluye un gestor de paquetes integrado con la forma de Cargo, lo que "
"hace que resulte sencillo descargar y compilar crates de terceros. Como "
"consecuencia, la biblioteca estándar puede ser más pequeña."
#: src/why-rust/modern.md:54
msgid ""
"Discovering good third-party crates can be a problem. Sites like help with this by letting you compare health metrics for crates to "
"find a good and trusted one."
msgstr ""
"Encontrar buenos crates de terceros puede ser un problema. Sitios como "
" te ayudan a comparar métricas de salud de crates para "
"encontrar uno bueno y fiable."
#: 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/) es una implementación de "
"LSP bien respaldada y utilizada en los principales IDE y editores de texto."
#: src/basic-syntax.md:3
msgid "Much of the Rust syntax will be familiar to you from C, C++ or Java:"
msgstr ""
"Gran parte de la sintaxis de Rust te resultará familiar de C, C++ o Java:"
#: src/basic-syntax.md:5
msgid "Blocks and scopes are delimited by curly braces."
msgstr "Los bloques y ámbitos están delimitados por llaves."
#: src/basic-syntax.md:6
msgid ""
"Line comments are started with `//`, block comments are delimited by `/* ... "
"*/`."
msgstr ""
"Los comentarios de línea empiezan por `//`, mientras que los comentarios de "
"bloque están delimitados por `/* ... */`."
#: src/basic-syntax.md:8
msgid "Keywords like `if` and `while` work the same."
msgstr "Palabras clave como `if` y `while` funcionan igual."
#: src/basic-syntax.md:9
msgid "Variable assignment is done with `=`, comparison is done with `==`."
msgstr ""
"La asignación de variables se realiza con `=` y la comparación con `==`."
#: 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 "Tipos"
#: src/basic-syntax/scalar-types.md:3 src/basic-syntax/compound-types.md:3
msgid "Literals"
msgstr "Literales"
#: src/basic-syntax/scalar-types.md:5
msgid "Signed integers"
msgstr "Enteros con signo"
#: src/basic-syntax/scalar-types.md:5
msgid "`i8`, `i16`, `i32`, `i64`, `i128`, `isize`"
msgstr ""
#: src/basic-syntax/scalar-types.md:5
msgid "`-10`, `0`, `1_000`, `123_i64`"
msgstr ""
#: src/basic-syntax/scalar-types.md:6
msgid "Unsigned integers"
msgstr "Enteros sin signo"
#: src/basic-syntax/scalar-types.md:6
msgid "`u8`, `u16`, `u32`, `u64`, `u128`, `usize`"
msgstr ""
#: src/basic-syntax/scalar-types.md:6
msgid "`0`, `123`, `10_u16`"
msgstr ""
#: src/basic-syntax/scalar-types.md:7
msgid "Floating point numbers"
msgstr "Números de coma flotante"
#: src/basic-syntax/scalar-types.md:7
msgid "`f32`, `f64`"
msgstr ""
#: src/basic-syntax/scalar-types.md:7
msgid "`3.14`, `-10.0e20`, `2_f32`"
msgstr ""
#: src/basic-syntax/scalar-types.md:8
msgid "Strings"
msgstr "Cadenas de texto (_Strings_)"
#: src/basic-syntax/scalar-types.md:8
msgid "`&str`"
msgstr ""
#: src/basic-syntax/scalar-types.md:8
msgid "`\"foo\"`, `\"two\\nlines\"`"
msgstr ""
#: src/basic-syntax/scalar-types.md:9
msgid "Unicode scalar values"
msgstr "Valores escalares Unicode"
#: src/basic-syntax/scalar-types.md:9
msgid "`char`"
msgstr ""
#: src/basic-syntax/scalar-types.md:9
msgid "`'a'`, `'α'`, `'∞'`"
msgstr ""
#: src/basic-syntax/scalar-types.md:10
msgid "Booleans"
msgstr "Booleanos"
#: src/basic-syntax/scalar-types.md:10
msgid "`bool`"
msgstr ""
#: src/basic-syntax/scalar-types.md:10
msgid "`true`, `false`"
msgstr ""
#: src/basic-syntax/scalar-types.md:12
msgid "The types have widths as follows:"
msgstr "Los tipos tienen la siguiente anchura:"
#: src/basic-syntax/scalar-types.md:14
msgid "`iN`, `uN`, and `fN` are _N_ bits wide,"
msgstr "`iN`, `uN`, and `fN` son _N_ bits de capacidad,"
#: src/basic-syntax/scalar-types.md:15
msgid "`isize` and `usize` are the width of a pointer,"
msgstr "`isize` y `usize` tienen el ancho de un puntero,"
#: src/basic-syntax/scalar-types.md:16
msgid "`char` is 32 bits wide,"
msgstr "`char` tiene un tamaño de 32 bits,"
#: src/basic-syntax/scalar-types.md:17
msgid "`bool` is 8 bits wide."
msgstr "`bool` tiene 8 bits de ancho."
#: src/basic-syntax/scalar-types.md:21
msgid "There are a few syntaxes which are not shown above:"
msgstr "Hay algunas sintaxis que no se han mostrado anteriormente:"
#: src/basic-syntax/scalar-types.md:23
msgid ""
"Raw strings allow you to create a `&str` value with escapes disabled: "
"`r\"\\n\" == \"\\\\n\"`. You can embed double-quotes by using an equal "
"amount of `#` on either side of the quotes:"
msgstr ""
"Las cadenas sin formato te permiten crear un valor `&str` con los escapes "
"inhabilitados: `r\"\\n\" == \"\\\\n\"`. Puedes insertar comillas dobles con "
"la misma cantidad de `#` a cada lado de ellas:"
#: src/basic-syntax/scalar-types.md:27
msgid ""
"```rust,editable\n"
"fn main() {\n"
" println!(r#\"link\"#);\n"
" println!(\"link\");\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/scalar-types.md:34
msgid "Byte strings allow you to create a `&[u8]` value directly:"
msgstr "Las cadenas de bytes te permiten crear un valor `&[u8]` directamente:"
#: src/basic-syntax/scalar-types.md:36
msgid ""
"```rust,editable\n"
"fn main() {\n"
" println!(\"{:?}\", b\"abc\");\n"
" println!(\"{:?}\", &[97, 98, 99]);\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/scalar-types.md:43
msgid ""
"All underscores in numbers can be left out, they are for legibility only. So "
"`1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written "
"as `123i64`."
msgstr ""
"Todos guiones bajos en los números pueden no utilizarse, ya que solo sirven "
"para facilitar la lectura. Por lo tanto, `1_000` se puede escribir como "
"`1000` (o `10_00`), y `123_i64` se puede escribir como `123i64`."
#: src/basic-syntax/compound-types.md:5
msgid "Arrays"
msgstr "Arrays"
#: src/basic-syntax/compound-types.md:5
msgid "`[T; N]`"
msgstr ""
#: src/basic-syntax/compound-types.md:5
msgid "`[20, 30, 40]`, `[0; 3]`"
msgstr ""
#: src/basic-syntax/compound-types.md:6
msgid "Tuples"
msgstr "Tuplas"
#: src/basic-syntax/compound-types.md:6
msgid "`()`, `(T,)`, `(T1, T2)`, ..."
msgstr ""
#: src/basic-syntax/compound-types.md:6
msgid "`()`, `('x',)`, `('x', 1.2)`, ..."
msgstr ""
#: src/basic-syntax/compound-types.md:8
msgid "Array assignment and access:"
msgstr "Asignación y acceso a arrays:"
#: src/basic-syntax/compound-types.md:10
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let mut a: [i8; 10] = [42; 10];\n"
" a[5] = 0;\n"
" println!(\"a: {:?}\", a);\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/compound-types.md:18
msgid "Tuple assignment and access:"
msgstr "Asignación y acceso a tuplas:"
#: src/basic-syntax/compound-types.md:20
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let t: (i8, bool) = (7, true);\n"
" println!(\"1st index: {}\", t.0);\n"
" println!(\"2nd index: {}\", t.1);\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/compound-types.md:32
msgid "Arrays:"
msgstr "Arrays:"
#: src/basic-syntax/compound-types.md:34
msgid ""
"A value of the array type `[T; N]` holds `N` (a compile-time constant) "
"elements of the same type `T`. Note that the length of the array is _part of "
"its type_, which means that `[u8; 3]` and `[u8; 4]` are considered two "
"different types."
msgstr ""
"Un valor del tipo array `[T; N]` contiene `N` (una constante en tiempo de "
"compilación) elementos del mismo tipo `T`. Ten en cuenta que la longitud del "
"array es *parte de su tipo*, lo que significa que `[u8; 3]` y `[u8; 4]` se "
"consideran dos tipos diferentes."
#: src/basic-syntax/compound-types.md:38
msgid "We can use literals to assign values to arrays."
msgstr "Podemos usar literales para asignar valores a arrays."
#: src/basic-syntax/compound-types.md:40
msgid ""
"In the main function, the print statement asks for the debug implementation "
"with the `?` format parameter: `{}` gives the default output, `{:?}` gives "
"the debug output. We could also have used `{a}` and `{a:?}` without "
"specifying the value after the format string."
msgstr ""
"En la función _main_, la instrucción de impresión solicita la implementación "
"de depuración con el parámetro de formato `?`: `{}` ofrece la salida "
"predeterminada y `{:?}` ofrece la salida de depuración. También se podría "
"haber usado `{a}` y `{a:?}` sin especificar el valor después de la cadena de "
"formato."
#: src/basic-syntax/compound-types.md:45
msgid ""
"Adding `#`, eg `{a:#?}`, invokes a \"pretty printing\" format, which can be "
"easier to read."
msgstr ""
"Si se añade `#`, por ejemplo `{a:#?}`, se da formato al texto para facilitar "
"la lectura."
#: src/basic-syntax/compound-types.md:47
msgid "Tuples:"
msgstr "Tuplas:"
#: src/basic-syntax/compound-types.md:49
msgid "Like arrays, tuples have a fixed length."
msgstr "Al igual que los arrays, las tuplas tienen una longitud fija."
#: src/basic-syntax/compound-types.md:51
msgid "Tuples group together values of different types into a compound type."
msgstr "Las tuplas agrupan valores de diferentes tipos en un tipo compuesto."
#: 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 ""
"Se puede acceder a los campos de una tupla por el punto y el índice del "
"valor, por ejemplo, `t.0`, `t.1`."
#: src/basic-syntax/compound-types.md:55
msgid ""
"The empty tuple `()` is also known as the \"unit type\". It is both a type, "
"and the only valid value of that type - that is to say both the type and its "
"value are expressed as `()`. It is used to indicate, for example, that a "
"function or expression has no return value, as we'll see in a future slide. "
msgstr ""
"La tupla vacía `()` también se conoce como \"tipo unitario\". Es a la vez un "
"tipo y el único valor válido de ese tipo, es decir, tanto el tipo como su "
"valor se expresan como `()`. Se usa para indicar, por ejemplo, que una "
"función o expresión no tiene valor de retorno, como veremos en una "
"diapositiva posterior."
#: 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 ""
"Podríamos pensar en ello como `void`, que quizá resulte familiar de otros "
"lenguajes de programación."
#: src/basic-syntax/references.md:3
msgid "Like C++, Rust has references:"
msgstr "Al igual que C++, Rust tiene referencias:"
#: src/basic-syntax/references.md:5
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let mut x: i32 = 10;\n"
" let ref_x: &mut i32 = &mut x;\n"
" *ref_x = 20;\n"
" println!(\"x: {x}\");\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/references.md:14
msgid "Some notes:"
msgstr "Algunas notas:"
#: src/basic-syntax/references.md:16
msgid ""
"We must dereference `ref_x` when assigning to it, similar to C and C++ "
"pointers."
msgstr ""
"Debemos desreferenciar `ref_x` al asignarle un valor, de forma similar a los "
"punteros de C y 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 realizará una desreferencia automática en algunos casos, en especial al "
"invocar métodos (prueba `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 ""
"Las referencias que se declaran como `mut` se pueden vincular a distintos "
"valores durante su tiempo de vida."
#: src/basic-syntax/references.md:25
msgid ""
"Be sure to note the difference between `let mut ref_x: &i32` and `let ref_x: "
"&mut i32`. The first one represents a mutable reference which can be bound "
"to different values, while the second represents a reference to a mutable "
"value."
msgstr ""
"Ten en cuenta la diferencia entre `let mut ref_x: &i32` y `let ref_x: &mut "
"i32`. La primera representa una referencia mutable que se puede vincular a "
"distintos valores, mientras que la segunda representa una referencia a un "
"valor mutable."
#: src/basic-syntax/references-dangling.md:3
msgid "Rust will statically forbid dangling references:"
msgstr "Rust prohibirá estáticamente las referencias colgantes:"
#: src/basic-syntax/references-dangling.md:5
msgid ""
"```rust,editable,compile_fail\n"
"fn main() {\n"
" let ref_x: &i32;\n"
" {\n"
" let x: i32 = 10;\n"
" ref_x = &x;\n"
" }\n"
" println!(\"ref_x: {ref_x}\");\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/references-dangling.md:16
msgid "A reference is said to \"borrow\" the value it refers to."
msgstr ""
"Se dice que una referencia \"toma prestado\" el valor al que hace referencia."
#: src/basic-syntax/references-dangling.md:17
msgid ""
"Rust is tracking the lifetimes of all references to ensure they live long "
"enough."
msgstr ""
"Rust hace un seguimiento del tiempo de vida de todas las referencias para "
"asegurarse de que duran lo suficiente."
#: src/basic-syntax/references-dangling.md:19
msgid "We will talk more about borrowing when we get to ownership."
msgstr ""
"Más adelante hablaremos de los préstamos cuando lleguemos a la parte de "
"propiedad."
#: src/basic-syntax/slices.md:3
msgid "A slice gives you a view into a larger collection:"
msgstr "Un _slice_ ofrece una visión de una colección más amplia:"
#: src/basic-syntax/slices.md:5
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let mut a: [i32; 6] = [10, 20, 30, 40, 50, 60];\n"
" println!(\"a: {a:?}\");\n"
"\n"
" let s: &[i32] = &a[2..4];\n"
"\n"
" println!(\"s: {s:?}\");\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/slices.md:16
msgid "Slices borrow data from the sliced type."
msgstr "Los slices toman prestados datos del tipo slice."
#: src/basic-syntax/slices.md:17
msgid "Question: What happens if you modify `a[3]` right before printing `s`?"
msgstr ""
"Pregunta: ¿Qué ocurre si se modifica `a[3]` justo antes de imprimir `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 ""
"Creamos un slice tomando prestado `a` y especificando entre paréntesis los "
"índices de inicio y de fin."
#: src/basic-syntax/slices.md:23
msgid ""
"If the slice starts at index 0, Rust’s range syntax allows us to drop the "
"starting index, meaning that `&a[0..a.len()]` and `&a[..a.len()]` are "
"identical."
msgstr ""
"Si el slice comienza en el índice 0, la sintaxis de intervalo de Rust nos "
"permite eliminar el índice inicial, lo que significa que `&a[0..a.len()]` y "
"`&a[..a.len()]` son idénticos."
#: 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 ""
"Lo mismo ocurre con el último índice, por lo que `&a[2..a.len()]` y "
"`&a[2..]` son idénticos."
#: src/basic-syntax/slices.md:27
msgid ""
"To easily create a slice of the full array, we can therefore use `&a[..]`."
msgstr ""
"Para crear fácilmente un slice del array completo, podemos usar `&a[..]`."
#: src/basic-syntax/slices.md:29
msgid ""
"`s` is a reference to a slice of `i32`s. Notice that the type of `s` "
"(`&[i32]`) no longer mentions the array length. This allows us to perform "
"computation on slices of different sizes."
msgstr ""
"`s` es una referencia a un slice de `i32`s. Ten en cuenta que el tipo de `s` "
"(`&[i32]`) ya no menciona la longitud del array. Esto nos permite realizar "
"cálculos en slices de diferentes tamaños."
#: 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 ""
"Los slices siempre tienen préstamos de otros objetos. En este ejemplo, `a` "
"tiene que permanecer \"con vida\" (en el ámbito) al menos durante el tiempo "
"que dure el slice. "
#: src/basic-syntax/slices.md:33
msgid ""
"The question about modifying `a[3]` can spark an interesting discussion, but "
"the answer is that for memory safety reasons you cannot do it through `a` at "
"this point in the execution, but you can read the data from both `a` and `s` "
"safely. It works before you created the slice, and again after the "
"`println`, when the slice is no longer used. More details will be explained "
"in the borrow checker section."
msgstr ""
"La cuestión sobre la modificación de `a[3]` puede suscitar un debate "
"interesante, pero la respuesta es que, por razones de seguridad de memoria, "
"no se puede hacer mediante `a` en este punto de la ejecución, pero sí se "
"pueden leer los datos de `a` y `s` de forma segura. Funciona antes de crear "
"el slice y después de `println`, cuando el slice ya no se utiliza. En la "
"sección que trata sobre el _borrow checker_ se dará más información."
#: src/basic-syntax/string-slices.md:1
msgid "`String` vs `str`"
msgstr "`String` o `str`"
#: src/basic-syntax/string-slices.md:3
msgid "We can now understand the two string types in Rust:"
msgstr "Ahora podemos entender los dos tipos de cadenas de Rust:"
#: src/basic-syntax/string-slices.md:5
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let s1: &str = \"World\";\n"
" println!(\"s1: {s1}\");\n"
"\n"
" let mut s2: String = String::from(\"Hello \");\n"
" println!(\"s2: {s2}\");\n"
" s2.push_str(s1);\n"
" println!(\"s2: {s2}\");\n"
" \n"
" let s3: &str = &s2[6..];\n"
" println!(\"s3: {s3}\");\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/string-slices.md:20
msgid "Rust terminology:"
msgstr "Terminología de Rust:"
#: src/basic-syntax/string-slices.md:22
msgid "`&str` an immutable reference to a string slice."
msgstr "`&str` es una referencia inmutable a un slice de una cadena."
#: src/basic-syntax/string-slices.md:23
msgid "`String` a mutable string buffer."
msgstr "`String` es un búfer de cadena mutable."
#: src/basic-syntax/string-slices.md:27
msgid ""
"`&str` introduces a string slice, which is an immutable reference to UTF-8 "
"encoded string data stored in a block of memory. String literals "
"(`”Hello”`), are stored in the program’s binary."
msgstr ""
"`&str` introduce un slice de cadena, que es una referencia inmutable a los "
"datos de cadena codificados en UTF-8 y almacenados en un bloque de memoria. "
"Los literales de cadena (`\"Hello\"`) se almacenan en el binario del "
"programa."
#: 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 ""
"El tipo `String` de Rust es un envoltorio que rodea a un vector de bytes. "
"Como sucede con `Vec`, tiene propiedad."
#: src/basic-syntax/string-slices.md:32
msgid ""
"As with many other types `String::from()` creates a string from a string "
"literal; `String::new()` creates a new empty string, to which string data "
"can be added using the `push()` and `push_str()` methods."
msgstr ""
"Al igual que ocurre con muchos otros tipos, `String::from()` crea una cadena "
"a partir de un literal de cadena. `String::new()` crea una cadena vacía a la "
"que se pueden añadir los datos de la cadena mediante los métodos `push()` y "
"`push_str()`."
#: src/basic-syntax/string-slices.md:35
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 ""
"La macro `format!()` es una forma práctica de generar una cadena propia a "
"partir de valores dinámicos. Acepta la misma especificación de formato que "
"`println!()`."
#: src/basic-syntax/string-slices.md:38
msgid ""
"You can borrow `&str` slices from `String` via `&` and optionally range "
"selection."
msgstr ""
"Puedes tomar prestados slices `&str` desde `String` mediante `&` y, si "
"quieres, puedes seleccionar intervalos."
#: src/basic-syntax/string-slices.md:40
msgid ""
"For C++ programmers: think of `&str` as `const char*` from C++, but the one "
"that always points to a valid string in memory. Rust `String` is a rough "
"equivalent of `std::string` from C++ (main difference: it can only contain "
"UTF-8 encoded bytes and will never use a small-string optimization)."
msgstr ""
"Para los programadores de C++: piensa en `&str` como el `const char*` de C+"
"+, pero el que siempre apunta a una cadena válida en la memoria. `String` de "
"Rust es parecido a `std::string` de C++ (la diferencia principal es que "
"solo puede contener bytes codificados en UTF-8 y nunca utilizará una "
"optimización de cadena pequeña)."
#: src/basic-syntax/functions.md:3
msgid ""
"A Rust version of the famous [FizzBuzz](https://en.wikipedia.org/wiki/"
"Fizz_buzz) interview question:"
msgstr ""
"Una versión de Rust de la famosa pregunta de la entrevista de [FizzBuzz]"
"(https://es.wikipedia.org/wiki/Fizz_buzz):"
#: src/basic-syntax/functions.md:5
msgid ""
"```rust,editable\n"
"fn main() {\n"
" print_fizzbuzz_to(20);\n"
"}\n"
"\n"
"fn is_divisible(n: u32, divisor: u32) -> bool {\n"
" if divisor == 0 {\n"
" return false;\n"
" }\n"
" n % divisor == 0\n"
"}\n"
"\n"
"fn fizzbuzz(n: u32) -> String {\n"
" let fizz = if is_divisible(n, 3) { \"fizz\" } else { \"\" };\n"
" let buzz = if is_divisible(n, 5) { \"buzz\" } else { \"\" };\n"
" if fizz.is_empty() && buzz.is_empty() {\n"
" return format!(\"{n}\");\n"
" }\n"
" format!(\"{fizz}{buzz}\")\n"
"}\n"
"\n"
"fn print_fizzbuzz_to(n: u32) {\n"
" for i in 1..=n {\n"
" println!(\"{}\", fizzbuzz(i));\n"
" }\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/functions.md:35
msgid ""
"We refer in `main` to a function written below. Neither forward declarations "
"nor headers are necessary. "
msgstr ""
"En `main` hacemos referencia a una función escrita más abajo. No se "
"necesitan declaraciones de redirección ni encabezados. "
#: 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 ""
"Los parámetros de declaración van seguidos de un tipo (al contrario que en "
"algunos lenguajes de programación) y, a continuación, de un tipo de "
"resultado devuelto."
#: src/basic-syntax/functions.md:37
msgid ""
"The last expression in a function body (or any block) becomes the return "
"value. Simply omit the `;` at the end of the expression."
msgstr ""
"La última expresión del cuerpo de una función (o de cualquier bloque) se "
"convierte en el valor devuelto. Basta con omitir el carácter `;` al final de "
"la expresión."
#: src/basic-syntax/functions.md:38
msgid ""
"Some functions have no return value, and return the 'unit type', `()`. The "
"compiler will infer this if the `-> ()` return type is omitted."
msgstr ""
"Algunas funciones no devuelven ningún valor, devuelven el \"tipo unitario\", "
"`()`. El compilador deducirá esto si se omite el tipo de retorno `-> ()`."
#: 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 ""
"La expresión de intervalo del bucle `for` en `print_fizzbuzz_to()` contiene "
"`=n`, lo que hace que incluya el límite superior."
#: src/basic-syntax/rustdoc.md:3
msgid ""
"All language items in Rust can be documented using special `///` syntax."
msgstr ""
"Todos los elementos del lenguaje de Rust se pueden documentar con la "
"sintaxis especial `///`."
#: src/basic-syntax/rustdoc.md:5
msgid ""
"```rust,editable\n"
"/// Determine whether the first argument is divisible by the second "
"argument.\n"
"///\n"
"/// If the second argument is zero, the result is false.\n"
"fn is_divisible_by(lhs: u32, rhs: u32) -> bool {\n"
" if rhs == 0 {\n"
" return false; // Corner case, early return\n"
" }\n"
" lhs % rhs == 0 // The last expression in a block is the return "
"value\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/rustdoc.md:17
msgid ""
"The contents are treated as Markdown. All published Rust library crates are "
"automatically documented at [`docs.rs`](https://docs.rs) using the [rustdoc]"
"(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 ""
"El contenido se trata como Markdown. Todos los crates de la biblioteca de "
"Rust publicados se documentan automáticamente\n"
" en [`docs.rs`](https://docs.rs) mediante la herramienta \n"
"[rustdoc](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html). Es "
"propio\n"
"documentar todos los elementos públicos de una API usando este patrón."
#: 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 ""
"Muestra a los alumnos los documentos generados para el crate `rand` en "
"[`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 ""
"Este curso no incluye diapositivas sobre rustdoc para ahorrar espacio, pero "
"deben aparecer en el código real."
#: 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 ""
"Los comentarios internos de los documentos se tratarán más adelante (en la "
"página de módulos), no es necesario tratarlos aquí."
#: src/basic-syntax/rustdoc.md:33
msgid ""
"Rustdoc comments can contain code snippets that we can run and test using "
"`cargo test`. We will discuss these tests in the [Testing section](../"
"testing/doc-tests.html)."
msgstr ""
"Los comentarios de rustdoc pueden contener fragmentos de código que podemos "
"ejecutar y probar utilizando `cargo test`. Hablaremos de esto en la [sección "
"de pruebas](../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 ""
"Los métodos son funciones asociadas a un tipo. El argumento `self` de un "
"método es una instancia del tipo al que está asociada:"
#: src/basic-syntax/methods.md:6
msgid ""
"```rust,editable\n"
"struct Rectangle {\n"
" width: u32,\n"
" height: u32,\n"
"}\n"
"\n"
"impl Rectangle {\n"
" fn area(&self) -> u32 {\n"
" self.width * self.height\n"
" }\n"
"\n"
" fn inc_width(&mut self, delta: u32) {\n"
" self.width += delta;\n"
" }\n"
"}\n"
"\n"
"fn main() {\n"
" let mut rect = Rectangle { width: 10, height: 5 };\n"
" println!(\"old area: {}\", rect.area());\n"
" rect.inc_width(5);\n"
" println!(\"new area: {}\", rect.area());\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/methods.md:30
msgid ""
"We will look much more at methods in today's exercise and in tomorrow's "
"class."
msgstr ""
"Abordaremos en mayor profundidad los métodos en el ejercicio de hoy y en la "
"clase de mañana."
#: src/basic-syntax/methods.md:34
msgid "Add a static method called `Rectangle::new` and call this from `main`:"
msgstr ""
"Añade un método estático denominado `Rectangle::new` y llámalo desde `main`:"
#: src/basic-syntax/methods.md:36
msgid ""
"```rust,editable,compile_fail\n"
"fn new(width: u32, height: u32) -> Rectangle {\n"
" Rectangle { width, height }\n"
"}\n"
"```"
msgstr ""
"```rust,editable,compile_fail\n"
"fn new(width: u32, height: u32) -> Rectangle {\n"
" Rectangle { width, height }\n"
"}\n"
"```"
#: src/basic-syntax/methods.md:42
msgid ""
"While _technically_, Rust does not have custom constructors, static methods "
"are commonly used to initialize structs (but don't have to). The actual "
"constructor, `Rectangle { width, height }`, could be called directly. See "
"the [Rustnomicon](https://doc.rust-lang.org/nomicon/constructors.html)."
msgstr ""
"Aunque _técnicamente_ Rust no tiene constructores personalizados, los "
"métodos estáticos se utilizan habitualmente para inicializar estructuras, "
"pero no es obligatorio. El constructor real, `Rectangle { width, height }`, "
"podría llamarse directamente. Consulta el [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 ""
"Añade un constructor `Rectangle::square(width: u32)` para mostrar que esos "
"métodos estáticos puede utilizar parámetros arbitrarios."
#: src/basic-syntax/functions-interlude.md:1
msgid "Function Overloading"
msgstr "Sobrecarga de funciones"
#: src/basic-syntax/functions-interlude.md:3
msgid "Overloading is not supported:"
msgstr "No se admite la sobrecarga:"
#: src/basic-syntax/functions-interlude.md:5
msgid "Each function has a single implementation:"
msgstr "Cada función tiene una única implementación:"
#: src/basic-syntax/functions-interlude.md:6
msgid "Always takes a fixed number of parameters."
msgstr "Siempre se utiliza un número fijo de parámetros."
#: src/basic-syntax/functions-interlude.md:7
msgid "Always takes a single set of parameter types."
msgstr "Siempre se utiliza un único conjunto de tipos de parámetros."
#: src/basic-syntax/functions-interlude.md:8
msgid "Default values are not supported:"
msgstr "No se admiten valores predeterminados:"
#: src/basic-syntax/functions-interlude.md:9
msgid "All call sites have the same number of arguments."
msgstr "Todos los sitios de llamada tienen el mismo número de argumentos."
#: src/basic-syntax/functions-interlude.md:10
msgid "Macros are sometimes used as an alternative."
msgstr "A veces, se utilizan macros como alternativa."
#: src/basic-syntax/functions-interlude.md:12
msgid "However, function parameters can be generic:"
msgstr "Sin embargo, los parámetros de función pueden ser genéricos:"
#: src/basic-syntax/functions-interlude.md:14
msgid ""
"```rust,editable\n"
"fn pick_one(a: T, b: T) -> T {\n"
" if std::process::id() % 2 == 0 { a } else { b }\n"
"}\n"
"\n"
"fn main() {\n"
" println!(\"coin toss: {}\", pick_one(\"heads\", \"tails\"));\n"
" println!(\"cash prize: {}\", pick_one(500, 1000));\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/functions-interlude.md:27
msgid ""
"When using generics, the standard library's `Into` can provide a kind of "
"limited polymorphism on argument types. We will see more details in a later "
"section."
msgstr ""
"Cuando se utilizan genéricos, el `Into` de la biblioteca estándar puede "
"proporcionar una especie de polimorfismo limitado en los tipos de "
"argumentos. Veremos más información al respecto en una sección posterior."
#: src/exercises/day-1/morning.md:1
msgid "Day 1: Morning Exercises"
msgstr "Día 1: ejercicios de la mañana"
#: src/exercises/day-1/morning.md:3
msgid "In these exercises, we will explore two parts of Rust:"
msgstr "En estos ejercicios, estudiaremos dos partes de Rust:"
#: src/exercises/day-1/morning.md:5
msgid "Implicit conversions between types."
msgstr "Conversiones implícitas entre tipos."
#: src/exercises/day-1/morning.md:7
msgid "Arrays and `for` loops."
msgstr "Arrays y bucles `for`."
#: src/exercises/day-1/morning.md:11
msgid "A few things to consider while solving the exercises:"
msgstr "Ten en cuenta lo siguiente a la hora de resolver los ejercicios:"
#: src/exercises/day-1/morning.md:13
msgid ""
"Use a local Rust installation, if possible. This way you can get auto-"
"completion in your editor. See the page about [Using Cargo](../../cargo.md) "
"for details on installing Rust."
msgstr ""
"Si es posible, utiliza una instalación local de Rust. De esta forma, podrás "
"autocompletar datos en tu editor. Consulta la página sobre \\[cómo usar "
"Cargo\\] para obtener más información sobre cómo instalar Rust."
#: src/exercises/day-1/morning.md:17
msgid "Alternatively, use the Rust Playground."
msgstr "También puedes usar el playground de 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 ""
"Los fragmentos de código no son editables a propósito: los que están "
"insertados pierden su estado si se sale de la página."
#: 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
#: src/exercises/concurrency/morning.md:12
msgid ""
"After looking at the exercises, you can look at the [solutions](solutions-"
"morning.md) provided."
msgstr ""
"Después de realizar los ejercicios, puedes consultar las [soluciones]"
"(solutions-morning.md) correspondientes."
#: src/exercises/day-1/implicit-conversions.md:3
msgid ""
"Rust will not automatically apply _implicit conversions_ between types "
"([unlike C++](https://en.cppreference.com/w/cpp/language/"
"implicit_conversion)). You can see this in a program like this:"
msgstr ""
"Rust no aplicará automáticamente _conversiones implícitas_ entre tipos ([a "
"diferencia de C++](https://en.cppreference.com/w/cpp/language/"
"implicit_conversion)). Puedes ver un ejemplo de esto en el siguiente "
"programa:"
#: src/exercises/day-1/implicit-conversions.md:6
msgid ""
"```rust,editable,compile_fail\n"
"fn multiply(x: i16, y: i16) -> i16 {\n"
" x * y\n"
"}\n"
"\n"
"fn main() {\n"
" let x: i8 = 15;\n"
" let y: i16 = 1000;\n"
"\n"
" println!(\"{x} * {y} = {}\", multiply(x, y));\n"
"}\n"
"```"
msgstr ""
#: src/exercises/day-1/implicit-conversions.md:19
msgid ""
"The Rust integer types all implement the [`From`](https://doc.rust-lang."
"org/std/convert/trait.From.html) and [`Into`](https://doc.rust-lang.org/"
"std/convert/trait.Into.html) traits to let us convert between them. The "
"`From` trait has a single `from()` method and similarly, the `Into` "
"trait has a single `into()` method. Implementing these traits is how a type "
"expresses that it can be converted into another type."
msgstr ""
"Todos los tipos de enteros de Rust implementan los traits [`From`]"
"(https://doc.rust-lang.org/std/convert/trait.From.html) y [`Into`]"
"(https://doc.rust-lang.org/std/convert/trait.Into.html) para permitirnos "
"realizar conversiones entre ellos. El trait `From` tiene un único método "
"`from()` y, del mismo modo, el trait `Into` tiene un único método "
"`into()`. Un tipo expresa que se puede convertir en otro tipo implementando "
"estos traits."
#: src/exercises/day-1/implicit-conversions.md:25
msgid ""
"The standard library has an implementation of `From for i16`, which "
"means that we can convert a variable `x` of type `i8` to an `i16` by "
"calling `i16::from(x)`. Or, simpler, with `x.into()`, because `From for "
"i16` implementation automatically create an implementation of `Into for "
"i8`."
msgstr ""
"La biblioteca estándar implementa `From for i16`, lo que significa que "
"podemos convertir una variable `x` del tipo `i8` a `i16` llamando a `i16::"
"from(x)`. O, más sencillo, con `x.into()`, ya que la implementación de "
"`From for i16` crea automáticamente una implementación de `Into for "
"i8`."
#: src/exercises/day-1/implicit-conversions.md:30
msgid ""
"The same applies for your own `From` implementations for your own types, so "
"it is sufficient to only implement `From` to get a respective `Into` "
"implementation automatically."
msgstr ""
"Lo mismo se aplica a tus implementaciones `From` para tus propios tipos, por "
"lo que basta con implementar `From` para obtener la respectiva "
"implementación `Into` de forma automática."
#: src/exercises/day-1/implicit-conversions.md:33
msgid "Execute the above program and look at the compiler error."
msgstr "Ejecuta el programa anterior y observa el error del compilador."
#: src/exercises/day-1/implicit-conversions.md:35
msgid "Update the code above to use `into()` to do the conversion."
msgstr ""
"Actualiza el código anterior para usar `into()` y realizar la conversión."
#: src/exercises/day-1/implicit-conversions.md:37
msgid ""
"Change the types of `x` and `y` to other things (such as `f32`, `bool`, "
"`i128`) to see which types you can convert to which other types. Try "
"converting small types to big types and the other way around. Check the "
"[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 ""
"Cambia los tipos de `x` e `y` a otros elementos (por ejemplo, `f32`, `bool`, "
"`i128`) para ver qué tipos puedes convertir. Prueba a convertir tipos "
"pequeños en tipos grandes y viceversa. Consulta la [documentación de la "
"biblioteca estándar](https://doc.rust-lang.org/std/convert/trait.From.html) "
"para comprobar si se ha implementado `From` en los pares que elijas."
#: src/exercises/day-1/for-loops.md:1
#: src/exercises/day-1/solutions-morning.md:3
msgid "Arrays and `for` Loops"
msgstr "Arrays y bucles`for`"
#: src/exercises/day-1/for-loops.md:3
msgid "We saw that an array can be declared like this:"
msgstr "Hemos visto que un array se puede declarar de la siguiente manera:"
#: src/exercises/day-1/for-loops.md:5
msgid ""
"```rust\n"
"let array = [10, 20, 30];\n"
"```"
msgstr ""
#: src/exercises/day-1/for-loops.md:9
msgid ""
"You can print such an array by asking for its debug representation with `{:?}"
"`:"
msgstr ""
"Puedes imprimir dicho array solicitando su representación de depuración con "
"`{:?}`:"
#: src/exercises/day-1/for-loops.md:11
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let array = [10, 20, 30];\n"
" println!(\"array: {array:?}\");\n"
"}\n"
"```"
msgstr ""
#: src/exercises/day-1/for-loops.md:18
msgid ""
"Rust lets you iterate over things like arrays and ranges using the `for` "
"keyword:"
msgstr ""
"Rust te permite iterar sobre elementos como arrays e intervalos usando la "
"palabra clave `for`:"
#: src/exercises/day-1/for-loops.md:21
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let array = [10, 20, 30];\n"
" print!(\"Iterating over array:\");\n"
" for n in &array {\n"
" print!(\" {n}\");\n"
" }\n"
" println!();\n"
"\n"
" print!(\"Iterating over range:\");\n"
" for i in 0..3 {\n"
" print!(\" {}\", array[i]);\n"
" }\n"
" println!();\n"
"}\n"
"```"
msgstr ""
#: src/exercises/day-1/for-loops.md:38
msgid ""
"Use the above to write a function `pretty_print` which pretty-print a matrix "
"and a function `transpose` which will transpose a matrix (turn rows into "
"columns):"
msgstr ""
"Usa el método anterior para escribir una función `pretty_print` que sirva "
"para dar formato al texto de la matriz y una función `transpose` que "
"transponga una matriz (convertir filas en columnas):"
#: src/exercises/day-1/for-loops.md:41
msgid ""
"```bob\n"
" ⎛⎡1 2 3⎤⎞ ⎡1 4 7⎤\n"
"\"transpose\"⎜⎢4 5 6⎥⎟ \"==\"⎢2 5 8⎥\n"
" ⎝⎣7 8 9⎦⎠ ⎣3 6 9⎦\n"
"```"
msgstr ""
#: src/exercises/day-1/for-loops.md:47
msgid "Hard-code both functions to operate on 3 × 3 matrices."
msgstr "Codifica ambas funciones para que operen con matrices de 3 × 3."
#: src/exercises/day-1/for-loops.md:49
msgid ""
"Copy the code below to and implement the "
"functions:"
msgstr ""
"Copia el siguiente fragmento de código en e "
"implementa las funciones:"
#: src/exercises/day-1/for-loops.md:52
msgid ""
"```rust,should_panic\n"
"// TODO: remove this when you're done with your implementation.\n"
"#![allow(unused_variables, dead_code)]\n"
"\n"
"fn transpose(matrix: [[i32; 3]; 3]) -> [[i32; 3]; 3] {\n"
" unimplemented!()\n"
"}\n"
"\n"
"fn pretty_print(matrix: &[[i32; 3]; 3]) {\n"
" unimplemented!()\n"
"}\n"
"\n"
"fn main() {\n"
" let matrix = [\n"
" [101, 102, 103], // <-- the comment makes rustfmt add a newline\n"
" [201, 202, 203],\n"
" [301, 302, 303],\n"
" ];\n"
"\n"
" println!(\"matrix:\");\n"
" pretty_print(&matrix);\n"
"\n"
" let transposed = transpose(matrix);\n"
" println!(\"transposed:\");\n"
" pretty_print(&transposed);\n"
"}\n"
"```"
msgstr ""
#: src/exercises/day-1/for-loops.md:80
msgid "Bonus Question"
msgstr "Pregunta Extra"
#: src/exercises/day-1/for-loops.md:82
msgid ""
"Could you use `&[i32]` slices instead of hard-coded 3 × 3 matrices for your "
"argument and return types? Something like `&[&[i32]]` for a two-dimensional "
"slice-of-slices. Why or why not?"
msgstr ""
"¿Se podrían usar slices `&[i32]` en lugar de matrices de 3 × 3 predefinidas "
"en el código para tus argumentos y tipos de resultados devueltos? Por "
"ejemplo, \\``&\\[&\\[i32\\]\\]\\` para un slice de slices de dos "
"dimensiones. ¿Por qué? ¿Por qué no?"
#: src/exercises/day-1/for-loops.md:87
msgid ""
"See the [`ndarray` crate](https://docs.rs/ndarray/) for a production quality "
"implementation."
msgstr ""
"Consulta el [crate `ndarray`](https://docs.rs/ndarray/) para obtener una "
"implementación con calidad de producción."
#: 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 ""
"La solución y la respuesta a la pregunta extra están disponibles en la "
"sección [soluciones](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 ""
"El uso de la referencia `&array` dentro de `for n in &array` es una vista "
"previa sutil de los problemas de propiedad que se tratarán más tarde por la "
"tarde."
#: src/exercises/day-1/for-loops.md:98
msgid "Without the `&`..."
msgstr "Sin el `&`..."
#: src/exercises/day-1/for-loops.md:99
msgid ""
"The loop would have been one that consumes the array. This is a change "
"[introduced in the 2021 Edition](https://doc.rust-lang.org/edition-guide/"
"rust-2021/IntoIterator-for-arrays.html)."
msgstr ""
"El bucle habría sido uno que consume el array. Este es un cambio "
"[introducido en la edición de 2021](https://doc.rust-lang.org/edition-guide/"
"rust-2021/IntoIterator-for-arrays.html)."
#: src/exercises/day-1/for-loops.md:102
msgid ""
"An implicit array copy would have occurred. Since `i32` is a copy type, "
"then `[i32; 3]` is also a copy type."
msgstr ""
"Se habría producido una copia implícita del array. Dado que `i32` es un tipo "
"de copia, `[i32; 3]` también es un tipo de copia."
#: src/control-flow.md:3
msgid ""
"As we have seen, `if` is an expression in Rust. It is used to conditionally "
"evaluate one of two blocks, but the blocks can have a value which then "
"becomes the value of the `if` expression. Other control flow expressions "
"work similarly in Rust."
msgstr ""
"Como hemos visto, `if` es una expresión de Rust. Se utiliza para realizar "
"una evaluación condicional de uno de los dos bloques, aunque estos pueden "
"tener un valor que acaba convirtiéndose en el valor de la expresión `if`. "
"Otras expresiones del flujo de control funcionan de forma similar en 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 ""
"En Rust, un bloque contiene una secuencia de expresiones. Cada bloque tiene "
"un tipo y un valor, que son los de la última expresión del bloque:"
#: src/control-flow/blocks.md:7
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let x = {\n"
" let y = 10;\n"
" println!(\"y: {y}\");\n"
" let z = {\n"
" let w = {\n"
" 3 + 4\n"
" };\n"
" println!(\"w: {w}\");\n"
" y * w\n"
" };\n"
" println!(\"z: {z}\");\n"
" z - y\n"
" };\n"
" println!(\"x: {x}\");\n"
"}\n"
"```"
msgstr ""
#: src/control-flow/blocks.md:26
msgid ""
"If the last expression ends with `;`, then the resulting value and type is "
"`()`."
msgstr ""
"Si la última expresión termina con `;`, el tipo y el valor resultante será "
"`()`."
#: src/control-flow/blocks.md:28
msgid ""
"The same rule is used for functions: the value of the function body is the "
"return value:"
msgstr ""
"Se utiliza la misma regla para las funciones: el valor del cuerpo de la "
"función es el valor devuelto:"
#: src/control-flow/blocks.md:31
msgid ""
"```rust,editable\n"
"fn double(x: i32) -> i32 {\n"
" x + x\n"
"}\n"
"\n"
"fn main() {\n"
" println!(\"doubled: {}\", double(7));\n"
"}\n"
"```"
msgstr ""
#: src/control-flow/blocks.md:43 src/enums.md:34 src/enums/sizes.md:28
#: 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 "Puntos Clave:"
#: 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 ""
"El objetivo de esta diapositiva es mostrar que los bloques tienen un tipo y "
"un valor en 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 ""
"Puedes mostrar cómo cambia el valor del bloque cambiando su última línea. "
"Por ejemplo, añade o quita un punto y coma, o utiliza la expresión `return`."
#: src/control-flow/if-expressions.md:1
msgid "`if` expressions"
msgstr "Expresiones `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 ""
"Puedes usar [expresiones `if`](https://doc.rust-lang.org/reference/"
"expressions/if-expr.html#if-expressions) de la misma forma que en otros "
"lenguajes:"
#: src/control-flow/if-expressions.md:7
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let mut x = 10;\n"
" if x % 2 == 0 {\n"
" x = x / 2;\n"
" } else {\n"
" x = 3 * x + 1;\n"
" }\n"
"}\n"
"```"
msgstr ""
#: src/control-flow/if-expressions.md:18
msgid ""
"In addition, you can use `if` as an expression. The last expression of each "
"block becomes the value of the `if` expression:"
msgstr ""
"Además, puedes utilizar `if` como expresión. La última expresión de cada "
"bloque se convierte en el valor de la expresión `if`:"
#: src/control-flow/if-expressions.md:22
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let mut x = 10;\n"
" x = if x % 2 == 0 {\n"
" x / 2\n"
" } else {\n"
" 3 * x + 1\n"
" };\n"
"}\n"
"```"
msgstr ""
#: src/control-flow/if-expressions.md:35
msgid ""
"Because `if` is an expression and must have a particular type, both of its "
"branch blocks must have the same type. Consider showing what happens if you "
"add `;` after `x / 2` in the second example."
msgstr ""
"Dado que `if` es una expresión y debe tener un tipo concreto, ambos bloques "
"de ramas deben tener el mismo tipo. En el segundo ejemplo, puedes mostrar lo "
"que sucede al añadir `;` después de `x / 2`."
#: src/control-flow/for-expressions.md:1
#, fuzzy
msgid "`for` loops"
msgstr "Bucles `for`"
#: src/control-flow/for-expressions.md:3
msgid ""
"The [`for` loop](https://doc.rust-lang.org/std/keyword.for.html) is closely "
"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 ""
"El [bucle `for`][`for` loop](https://doc.rust-lang.org/std/keyword.for.html) "
"está estrechamente relacionado con el [bucle `while let`](while-let-"
"expressions.md). Llamará automáticamente a `into_iter()` en la expresión y "
"después iterará sobre ella:"
#: src/control-flow/for-expressions.md:7
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let v = vec![10, 20, 30];\n"
"\n"
" for x in v {\n"
" println!(\"x: {x}\");\n"
" }\n"
" \n"
" for i in (0..10).step_by(2) {\n"
" println!(\"i: {i}\");\n"
" }\n"
"}\n"
"```"
msgstr ""
#: src/control-flow/for-expressions.md:21
msgid "You can use `break` and `continue` here as usual."
msgstr "Aquí puedes usar `break` y `continue` como de costumbre."
#: src/control-flow/for-expressions.md:25
msgid "Index iteration is not a special syntax in Rust for just that case."
msgstr ""
"La iteración de índices no es una sintaxis especial en Rust para ese caso."
#: src/control-flow/for-expressions.md:26
msgid "`(0..10)` is a range that implements an `Iterator` trait. "
msgstr "`(0..10)` es un rango que implementa un `Iterator` trait."
#: 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` es un método que devuelve otro `Iterator` que salta cada otro "
"elemento."
#: 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 ""
"Modifica los elementos del vector y explica los errores del compilador. "
"Cambia el vector `v` para que sea mutable y el bucle `for x in v.iter_mut()`."
#: src/control-flow/while-expressions.md:1
msgid "`while` loops"
msgstr "Bucles `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 ""
"La [palabra clave `while`](https://doc.rust-lang.org/reference/expressions/"
"loop-expr.html#predicate-loops) es muy similar a otros lenguajes:"
#: src/control-flow/while-expressions.md:6
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let mut x = 10;\n"
" while x != 1 {\n"
" x = if x % 2 == 0 {\n"
" x / 2\n"
" } else {\n"
" 3 * x + 1\n"
" };\n"
" }\n"
" println!(\"Final x: {x}\");\n"
"}\n"
"```"
msgstr ""
#: src/control-flow/break-continue.md:1
msgid "`break` and `continue`"
msgstr "`break` y `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 ""
"Si quieres salir de un bucle antes, usa [`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 ""
"Si quieres iniciar inmediatamente la siguiente iteración, usa [`continue`]"
"(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 ""
"De forma opcional, tanto `continue` como `break` pueden utilizar un "
"argumento de etiqueta para interrumpir los bucles anidados:"
#: src/control-flow/break-continue.md:10
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let v = vec![10, 20, 30];\n"
" let mut iter = v.into_iter();\n"
" 'outer: while let Some(x) = iter.next() {\n"
" println!(\"x: {x}\");\n"
" let mut i = 0;\n"
" while i < x {\n"
" println!(\"x: {x}, i: {i}\");\n"
" i += 1;\n"
" if i == 3 {\n"
" break 'outer;\n"
" }\n"
" }\n"
" }\n"
"}\n"
"```"
msgstr ""
#: src/control-flow/break-continue.md:28
msgid ""
"In this case we break the outer loop after 3 iterations of the inner loop."
msgstr ""
"En este caso, detenemos el bucle exterior tras tres iteraciones del bucle "
"interno."
#: src/control-flow/loop-expressions.md:1
msgid "`loop` expressions"
msgstr "Expresiones `loop`"
#: 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 ""
"Por último, la [palabra clave `loop`](https://doc.rust-lang.org/reference/"
"expressions/loop-expr.html#infinite-loops) crea un bucle infinito."
#: src/control-flow/loop-expressions.md:6
msgid "Here you must either `break` or `return` to stop the loop:"
msgstr "Para detener el bucle, debes usar `break` o `return`:"
#: src/control-flow/loop-expressions.md:8
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let mut x = 10;\n"
" loop {\n"
" x = if x % 2 == 0 {\n"
" x / 2\n"
" } else {\n"
" 3 * x + 1\n"
" };\n"
" if x == 1 {\n"
" break;\n"
" }\n"
" }\n"
" println!(\"Final x: {x}\");\n"
"}\n"
"```"
msgstr ""
#: src/control-flow/loop-expressions.md:27
msgid "Break the `loop` with a value (e.g. `break 8`) and print it out."
msgstr "Interrumpe `loop` con un valor (por ejemplo, `break 8`) e imprímelo."
#: src/control-flow/loop-expressions.md:28
msgid ""
"Note that `loop` is the only looping construct which returns a non-trivial "
"value. This is because it's guaranteed to be entered at least once (unlike "
"`while` and `for` loops)."
msgstr ""
"Ten en cuenta que `loop` es la única construcción de bucle que devuelve un "
"valor no trivial. Esto se debe a que es inevitable que se introduzca al "
"menos una vez (a diferencia de los bucles `while` y `for`)."
#: src/basic-syntax/variables.md:3
msgid ""
"Rust provides type safety via static typing. Variable bindings are immutable "
"by default:"
msgstr ""
"Rust ofrece seguridad de tipos mediante tipado estático. De forma "
"predeterminada, los enlaces a variables son inmutables:"
#: src/basic-syntax/variables.md:6
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let x: i32 = 10;\n"
" println!(\"x: {x}\");\n"
" // x = 20;\n"
" // println!(\"x: {x}\");\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/variables.md:17
msgid ""
"Due to type inference the `i32` is optional. We will gradually show the "
"types less and less as the course progresses."
msgstr ""
"Debido a la inferencia de tipos, `i32` es opcional. A medida que avance el "
"curso, iremos mostrando cada vez menos los tipos."
#: src/basic-syntax/type-inference.md:3
msgid "Rust will look at how the variable is _used_ to determine the type:"
msgstr "Rust consultará cómo se _usa_ la variable para determinar el tipo:"
#: src/basic-syntax/type-inference.md:5
msgid ""
"```rust,editable\n"
"fn takes_u32(x: u32) {\n"
" println!(\"u32: {x}\");\n"
"}\n"
"\n"
"fn takes_i8(y: i8) {\n"
" println!(\"i8: {y}\");\n"
"}\n"
"\n"
"fn main() {\n"
" let x = 10;\n"
" let y = 20;\n"
"\n"
" takes_u32(x);\n"
" takes_i8(y);\n"
" // takes_u32(y);\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/type-inference.md:26
msgid ""
"This slide demonstrates how the Rust compiler infers types based on "
"constraints given by variable declarations and usages."
msgstr ""
"Esta diapositiva muestra cómo el compilador de Rust infiere tipos basándose "
"en restricciones proporcionadas por declaraciones y usos de variables."
#: src/basic-syntax/type-inference.md:28
msgid ""
"It is very important to emphasize that variables declared like this are not "
"of some sort of dynamic \"any type\" that can hold any data. The machine "
"code generated by such declaration is identical to the explicit declaration "
"of a type. The compiler does the job for us and helps us write more concise "
"code."
msgstr ""
"Es muy importante subrayar que las variables que se declaran así no son de "
"un \"tipo cualquiera\" dinámico que pueda contener cualquier dato. El código "
"máquina generado por tal declaración es idéntico a la declaración explícita "
"de un tipo. El compilador hace el trabajo por nosotros y nos ayuda a "
"escribir código más conciso."
#: src/basic-syntax/type-inference.md:32
msgid ""
"The following code tells the compiler to copy into a certain generic "
"container without the code ever explicitly specifying the contained type, "
"using `_` as a placeholder:"
msgstr ""
"El siguiente fragmento de código le indica al compilador que copie en un "
"determinado contenedor genérico sin que el código especifique explícitamente "
"el tipo contenido utilizando `_` como marcador de posición:"
#: src/basic-syntax/type-inference.md:34
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let mut v = Vec::new();\n"
" v.push((10, false));\n"
" v.push((20, true));\n"
" println!(\"v: {v:?}\");\n"
"\n"
" let vv = v.iter().collect::>();\n"
" println!(\"vv: {vv:?}\");\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/type-inference.md:46
msgid ""
"[`collect`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator."
"html#method.collect) relies on [`FromIterator`](https://doc.rust-lang.org/"
"std/iter/trait.FromIterator.html), which [`HashSet`](https://doc.rust-lang."
"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) se basa en [`FromIterator`](https://doc.rust-lang.org/"
"std/iter/trait.FromIterator.html), que implementa [`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 "Variables Estáticas y Constantes"
#: src/basic-syntax/static-and-const.md:3
msgid ""
"Static and constant variables are two different ways to create globally-"
"scoped values that cannot be moved or reallocated during the execution of "
"the program. "
msgstr ""
"Las variables estáticas y constantes son dos formas diferentes de crear "
"valores de ámbito global que no se pueden mover ni reasignar durante la "
"ejecución del programa. "
#: src/basic-syntax/static-and-const.md:6
msgid "`const`"
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 ""
"Las variables constantes se evalúan en tiempo de compilación y sus valores "
"se insertan dondequiera que se utilicen:"
#: src/basic-syntax/static-and-const.md:11
msgid ""
"```rust,editable\n"
"const DIGEST_SIZE: usize = 3;\n"
"const ZERO: Option = Some(42);\n"
"\n"
"fn compute_digest(text: &str) -> [u8; DIGEST_SIZE] {\n"
" let mut digest = [ZERO.unwrap_or(0); DIGEST_SIZE];\n"
" for (idx, &b) in text.as_bytes().iter().enumerate() {\n"
" digest[idx % DIGEST_SIZE] = digest[idx % DIGEST_SIZE]."
"wrapping_add(b);\n"
" }\n"
" digest\n"
"}\n"
"\n"
"fn main() {\n"
" let digest = compute_digest(\"Hello\");\n"
" println!(\"Digest: {digest:?}\");\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/static-and-const.md:29
#, fuzzy
msgid ""
"According to the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-"
"vs-static.html) these are inlined upon use."
msgstr ""
"Según el libro [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-"
"vs-static.html), se insertan cuando se utilizan."
#: 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 ""
"Sólo se pueden llamar a las funciones marcadas como `const` en tiempo de "
"compilación para generar valores `const`. Sin embargo, las funciones `const` "
"se pueden llamar en _runtime_."
#: src/basic-syntax/static-and-const.md:33
msgid "`static`"
msgstr "`static`"
#: 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 ""
"Las variables estáticas vivirán durante toda la ejecución del programa y, "
"por lo tanto, no se moverán:"
#: src/basic-syntax/static-and-const.md:37
msgid ""
"```rust,editable\n"
"static BANNER: &str = \"Welcome to RustOS 3.14\";\n"
"\n"
"fn main() {\n"
" println!(\"{BANNER}\");\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/static-and-const.md:45
msgid ""
"As noted in the [Rust RFC Book](https://rust-lang.github.io/rfcs/0246-const-"
"vs-static.html), these are not inlined upon use and have an actual "
"associated memory location. This is useful for unsafe and embedded code, "
"and the variable lives through the entirety of the program execution. When a "
"globally-scoped value does not have a reason to need object identity, "
"`const` is generally preferred."
msgstr ""
"Tal y como se indica en el libro [Rust RFC Book](https://rust-lang.github.io/"
"rfcs/0246-const-vs-static.html), no están insertadas y tienen una ubicación "
"de memoria real asociada. Esto resulta útil para código insertado y no "
"seguro. Además, la variable continúa durante toda la ejecución del programa. "
"Cuando un valor de ámbito global no tiene ningún motivo para necesitar "
"identidad de objeto, se suele preferir `const`."
#: src/basic-syntax/static-and-const.md:49
msgid ""
"Because `static` variables are accessible from any thread, they must be "
"`Sync`. Interior mutability is possible through a [`Mutex`](https://doc.rust-"
"lang.org/std/sync/struct.Mutex.html), atomic or similar. It is also possible "
"to have mutable statics, but they require manual synchronisation so any "
"access to them requires `unsafe` code. We will look at [mutable statics](../"
"unsafe/mutable-static-variables.md) in the chapter on Unsafe Rust."
msgstr ""
"Dado que se puede acceder a las variables `static` desde cualquier hilo, es "
"necesario protegerlas, por ejemplo, mediante un comando [`Mutex`](https://"
"doc.rust-lang.org/std/sync/struct.Mutex.html), o que sean accesibles usando "
"código `unsafe`. Veremos la [mutación de datos estáticos](../unsafe/mutable-"
"static-variables.md) en el capítulo sobre Rust inseguro."
#: src/basic-syntax/static-and-const.md:57
msgid "Mention that `const` behaves semantically similar to C++'s `constexpr`."
msgstr ""
"Menciona que `const` se comporta semánticamente de forma similar a "
"`constexpr` de 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 ""
"Por su parte, `static` se parece mucho más a `const` o a una variable global "
"mutable de 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` proporciona la identidad del objeto: una dirección en la memoria y "
"en el estado que requieren los tipos con mutabilidad interior, como "
"`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 ""
"No es muy habitual que se necesite una constante evaluada en _runtime_, pero "
"es útil y más seguro que usar una estática."
#: src/basic-syntax/static-and-const.md:61
msgid "`thread_local` data can be created with the macro `std::thread_local`."
msgstr ""
"Datos del `thread_local` se pueden crear con la macro `std::thread_local`."
#: src/basic-syntax/static-and-const.md:63
msgid "Properties table:"
msgstr "Tabla de Propiedades:"
#: src/basic-syntax/static-and-const.md:65
msgid "Property"
msgstr "Propiedad"
#: src/basic-syntax/static-and-const.md:65
msgid "Static"
msgstr "Estático"
#: src/basic-syntax/static-and-const.md:65
msgid "Constant"
msgstr "Constante"
#: src/basic-syntax/static-and-const.md:67
msgid "Has an address in memory"
msgstr "Tiene una dirección en la memoria"
#: 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 "Sí"
#: src/basic-syntax/static-and-const.md:67
msgid "No (inlined)"
msgstr "No (insertado)"
#: src/basic-syntax/static-and-const.md:68
msgid "Lives for the entire duration of the program"
msgstr "Vive durante toda la ejecución del programa"
#: 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 "No"
#: src/basic-syntax/static-and-const.md:69
msgid "Can be mutable"
msgstr "Puede ser mutable"
#: src/basic-syntax/static-and-const.md:69
msgid "Yes (unsafe)"
msgstr "Sí (inseguro)"
#: src/basic-syntax/static-and-const.md:70
msgid "Evaluated at compile time"
msgstr "Evaluado en tiempo de compilación"
#: src/basic-syntax/static-and-const.md:70
msgid "Yes (initialised at compile time)"
msgstr "Sí (inicializado en tiempo de compilación)"
#: src/basic-syntax/static-and-const.md:71
msgid "Inlined wherever it is used"
msgstr "Insertado dondequiera que se utilice"
#: src/basic-syntax/scopes-shadowing.md:3
msgid ""
"You can shadow variables, both those from outer scopes and variables from "
"the same scope:"
msgstr ""
"Puedes sombrear variables, tanto las de ámbitos externos como las del propio "
"ámbito:"
#: src/basic-syntax/scopes-shadowing.md:6
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let a = 10;\n"
" println!(\"before: {a}\");\n"
"\n"
" {\n"
" let a = \"hello\";\n"
" println!(\"inner scope: {a}\");\n"
"\n"
" let a = true;\n"
" println!(\"shadowed in inner scope: {a}\");\n"
" }\n"
"\n"
" println!(\"after: {a}\");\n"
"}\n"
"```"
msgstr ""
#: src/basic-syntax/scopes-shadowing.md:25
msgid ""
"Definition: Shadowing is different from mutation, because after shadowing "
"both variable's memory locations exist at the same time. Both are available "
"under the same name, depending where you use it in the code. "
msgstr ""
"Definición: _Shadowing_ (sombreado) es distinto de la mutación, ya que, "
"después de sombrear la memoria de las dos variables, las ubicaciones existen "
"al mismo tiempo. Ambas están disponibles bajo el mismo nombre, en función de "
"dónde se utiliza en el código. "
#: src/basic-syntax/scopes-shadowing.md:26
msgid "A shadowing variable can have a different type. "
msgstr "Una variable sombreada puede tener un tipo diferente. "
#: src/basic-syntax/scopes-shadowing.md:27
msgid ""
"Shadowing looks obscure at first, but is convenient for holding on to values "
"after `.unwrap()`."
msgstr ""
"Al principio, el sombreado no es fácil, pero resulta útil para conservar "
"valores después de `.unwrap()`."
#: src/basic-syntax/scopes-shadowing.md:28
msgid ""
"The following code demonstrates why the compiler can't simply reuse memory "
"locations when shadowing an immutable variable in a scope, even if the type "
"does not change."
msgstr ""
"El siguiente fragmento de código demuestra por qué el compilador no puede "
"reutilizar ubicaciones de memoria cuando sombrea una variable inmutable en "
"un ámbito, incluso si el tipo no cambia."
#: src/basic-syntax/scopes-shadowing.md:30
msgid ""
"```rust,editable\n"
"fn main() {\n"
" let a = 1;\n"
" let b = &a;\n"
" let a = a + 1;\n"
" println!(\"{a} {b}\");\n"
"}\n"
"```"
msgstr ""
#: src/enums.md:3
msgid ""
"The `enum` keyword allows the creation of a type which has a few different "
"variants:"
msgstr ""
"La palabra clave `enum` permite crear un tipo que tiene diferentes variantes:"
#: src/enums.md:6
msgid ""
"```rust,editable\n"
"fn generate_random_number() -> i32 {\n"
" // Implementation based on https://xkcd.com/221/\n"
" 4 // Chosen by fair dice roll. Guaranteed to be random.\n"
"}\n"
"\n"
"#[derive(Debug)]\n"
"enum CoinFlip {\n"
" Heads,\n"
" Tails,\n"
"}\n"
"\n"
"fn flip_coin() -> CoinFlip {\n"
" let random_number = generate_random_number();\n"
" if random_number % 2 == 0 {\n"
" return CoinFlip::Heads;\n"
" } else {\n"
" return CoinFlip::Tails;\n"
" }\n"
"}\n"
"\n"
"fn main() {\n"
" println!(\"You got: {:?}\", flip_coin());\n"
"}\n"
"```"
msgstr ""
"```rust,editable\n"
"fn generate_random_number() -> i32 {\n"
" // Implementation based on https://xkcd.com/221/\n"
" 4 // Chosen by fair dice roll. Guaranteed to be random.\n"
"}\n"
"\n"
"#[derive(Debug)]\n"
"enum CoinFlip {\n"
" Heads,\n"
" Tails,\n"
"}\n"
"\n"
"fn flip_coin() -> CoinFlip {\n"
" let random_number = generate_random_number();\n"
" if random_number % 2 == 0 {\n"
" return CoinFlip::Heads;\n"
" } else {\n"
" return CoinFlip::Tails;\n"
" }\n"
"}\n"
"\n"
"fn main() {\n"
" println!(\"You got: {:?}\", flip_coin());\n"
"}\n"
"```"
#: src/enums.md:36
msgid "Enumerations allow you to collect a set of values under one type"
msgstr ""
"Las enumeraciones te permiten recoger un conjunto de valores en un solo tipo."
#: 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 ""
"En esta página se ofrece el tipo de enumeración `CoinFlip` (tirar moneda) "
"con dos variantes: `Heads` (cara) y `Tails` (cruz). Puede que veas el "
"espacio de nombres cuando utilices variantes."
#: src/enums.md:38
msgid "This might be a good time to compare Structs and Enums:"
msgstr ""
"Este es un buen momento para comparar las estructuras y las enumeraciones:"
#: 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 ""
"En ambas puedes tener una versión sencilla sin campos (estructura unitaria) "
"o una versión con distintos tipos de campos (variantes con carga útil). "
#: src/enums.md:40
msgid "In both, associated functions are defined within an `impl` block."
msgstr ""
"En ambos casos, las funciones asociadas se definen en un bloque `impl`."
#: src/enums.md:41
msgid ""
"You could even implement the different variants of an enum with separate "
"structs but then they wouldn’t be the same type as they would if they were "
"all defined in an enum. "
msgstr ""
"Incluso podrías implementar las distintas variantes de una enumeración con "
"estructuras diferentes, pero entonces no serían del mismo tipo como lo "
"serían si estuvieran todas definidas en una enumeración. "
#: 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 ""
"Puedes definir enumeraciones más completas en las que las variantes "
"contienen datos. Después, puedes usar la instrucción `match` para extraer "
"los datos de cada variante:"
#: src/enums/variant-payloads.md:6
msgid ""
"```rust,editable\n"
"enum WebEvent {\n"
" PageLoad, // Variant without payload\n"
" KeyPress(char), // Tuple struct variant\n"
" Click { x: i64, y: i64 }, // Full struct variant\n"
"}\n"
"\n"
"#[rustfmt::skip]\n"
"fn inspect(event: WebEvent) {\n"
" match event {\n"
" WebEvent::PageLoad => println!(\"page loaded\"),\n"
" WebEvent::KeyPress(c) => println!(\"pressed '{c}'\"),\n"
" WebEvent::Click { x, y } => println!(\"clicked at x={x}, y={y}\"),\n"
" }\n"
"}\n"
"\n"
"fn main() {\n"
" let load = WebEvent::PageLoad;\n"
" let press = WebEvent::KeyPress('x');\n"
" let click = WebEvent::Click { x: 20, y: 80 };\n"
"\n"
" inspect(load);\n"
" inspect(press);\n"
" inspect(click);\n"
"}\n"
"```"
msgstr ""
#: src/enums/variant-payloads.md:35
msgid ""
"The values in the enum variants can only be accessed after being pattern "
"matched. The pattern binds references to the fields in the \"match arm\" "
"after the `=>`."
msgstr ""
"Solo se puede acceder a los valores de las variantes de enumeración una vez "
"que coincidan con el patrón. El patrón vincula referencias a los campos del "
"\"brazo de coincidencias\" después de `=>`."
#: 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 ""
"La expresión se coteja con los patrones de arriba abajo. No hay ningún "
"sistema de respaldo, como en C o 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 ""
"La expresión de coincidencia tiene un valor. El valor es la última expresión "
"en el brazo de coincidencia que se ha ejecutado."
#: 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 ""
"Empezando por la parte superior, buscaremos el patrón que coincide con el "
"valor y, a continuación, ejecutaremos el fragmento de código que sigue a la "
"flecha. Cuando encontremos una coincidencia, pararemos. "
#: 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 ""
"Demuestra lo que pasa cuando la búsqueda no es exhaustiva. Ten en cuenta la "
"ventaja que ofrece el compilador de Rust al confirmar cuándo se gestionan "
"todos los casos. "
#: src/enums/variant-payloads.md:40
msgid "`match` inspects a hidden discriminant field in the `enum`."
msgstr "`match` inspecciona un campo discriminante oculto en `enum`."
#: src/enums/variant-payloads.md:41
msgid ""
"It is possible to retrieve the discriminant by calling `std::mem::"
"discriminant()`"
msgstr ""
"Se puede obtener el discriminante llamando a `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 ""
"Esto resulta útil si, por ejemplo, se implementa `PartialEq` en estructuras "
"en las que la comparación de valores de campos no afecta a la igualdad."
#: src/enums/variant-payloads.md:43
msgid ""
"`WebEvent::Click { ... }` is not exactly the same as `WebEvent::"
"Click(Click)` with a top level `struct Click { ... }`. The inlined version "
"cannot implement traits, for example."
msgstr ""
"`WebEvent::Click { ... }` no es exactamente lo mismo que `WebEvent::"
"Click(Click)` con un nivel superior `struct Click { ... }`. La versión "
"insertada no puede implementar traits, por ejemplo."
#: src/enums/sizes.md:3
msgid ""
"Rust enums are packed tightly, taking constraints due to alignment into "
"account:"
msgstr ""
"Las enumeraciones de Rust son densamente empaquetadas, ya que tienen en "
"cuenta las restricciones debidas a la alineación:"
#: src/enums/sizes.md:5
msgid ""
"```rust,editable\n"
"use std::any::type_name;\n"
"use std::mem::{align_of, size_of};\n"
"\n"
"fn dbg_size() {\n"
" println!(\"{}: size {} bytes, align: {} bytes\",\n"
" type_name::(), size_of::(), align_of::());\n"
"}\n"
"\n"
"enum Foo {\n"
" A,\n"
" B,\n"
"}\n"
"\n"
"fn main() {\n"
" dbg_size::();\n"
"}\n"
"```"
msgstr ""
#: src/enums/sizes.md:24
msgid ""
"See the [Rust Reference](https://doc.rust-lang.org/reference/type-layout."
"html)."
msgstr ""
"Consulta el libro [Rust Reference](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 utiliza un campo (discriminante) de forma interna para hacer un "
"seguimiento de la variante de enumeración."
#: src/enums/sizes.md:32
msgid ""
"You can control the discriminant if needed (e.g., for compatibility with C):"
msgstr ""
"Puedes controlar el discriminante si es necesario (por ejemplo, para "
"asegurar la compatibilidad con C):"
#: src/enums/sizes.md:34
msgid ""
"```rust,editable\n"
"#[repr(u32)]\n"
"enum Bar {\n"
" A, // 0\n"
" B = 10000,\n"
" C, // 10001\n"
"}\n"
"\n"
"fn main() {\n"
" println!(\"A: {}\", Bar::A as u32);\n"
" println!(\"B: {}\", Bar::B as u32);\n"
" println!(\"C: {}\", Bar::C as u32);\n"
"}\n"
"```"
msgstr ""
#: src/enums/sizes.md:49
msgid ""
"Without `repr`, the discriminant type takes 2 bytes, because 10001 fits 2 "
"bytes."
msgstr ""
"Sin `repr`, el tipo discriminante ocupa 2 bytes, debido a que 10001 se cabe "
"en 2 bytes."
#: src/enums/sizes.md:53
msgid "Try out other types such as"
msgstr "Prueba otros tipos, como"
#: src/enums/sizes.md:55
msgid "`dbg_size!(bool)`: size 1 bytes, align: 1 bytes,"
msgstr "`dbg_size!(bool)`: tamaño de 1 byte, alineación de 1 byte,"
#: src/enums/sizes.md:56
msgid ""
"`dbg_size!(Option)`: size 1 bytes, align: 1 bytes (niche optimization, "
"see below),"
msgstr ""
"`dbg_size!(Option)`: tamaño de 1 byte, alineación de 1 byte "
"(optimización de nichos, consulta más abajo),"
#: src/enums/sizes.md:57
msgid "`dbg_size!(&i32)`: size 8 bytes, align: 8 bytes (on a 64-bit machine),"
msgstr ""
"`dbg_size!(&i32)`: tamaño de 8 bytes, alineación de 8 bytes (en una máquina "
"de 64 bits),"
#: 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>)`: tamaño de 8 bytes, alineación de 8 bytes "
"(optimización del puntero nulo, consulta más abajo)."
#: src/enums/sizes.md:60
msgid ""
"Niche optimization: Rust will merge unused bit patterns for the enum "
"discriminant."
msgstr ""
"Optimización de nichos: Rust combina los patrones de bits no utilizados para "
"el discriminante de enumeración."
#: src/enums/sizes.md:63
msgid ""
"Null pointer optimization: For [some types](https://doc.rust-lang.org/std/"
"option/#representation), Rust guarantees that `size_of::()` equals "
"`size_of::