@@ -1734,14 +1734,18 @@ msgid ""
17341734"if the `std` library implemented a single style for all `Vec<T>`, what style "
17351735"should it be? Would it be either of these two?"
17361736msgstr ""
1737+ "`fmt::Display` puede ser más limpio que `fmt::Debug` pero esto presenta un problema"
1738+ "para la biblioteca `std`. ¿Cómo se deben mostrar los tipos ambiguos? Por ejemplo, " ,
1739+ "si la biblioteca `std` implementó un sólo estilo para todos `Vec<T>`, ¿qué estilo "
1740+ "debería ser? ¿Sería cualquiera de estos dos?"
17371741
17381742#: src/hello/print/print_display.md:35
17391743msgid "`Vec<path>`: `/:/etc:/home/username:/bin` (split on `:`)"
1740- msgstr ""
1744+ msgstr "`Vec<path>`: `/:/etc:/home/usuario:/bin` (split on `:`) "
17411745
17421746#: src/hello/print/print_display.md:36
17431747msgid "`Vec<number>`: `1,2,3` (split on `,`)"
1744- msgstr ""
1748+ msgstr "`Vec<numero>`: `1,2,3` (partido en `,`) "
17451749
17461750#: src/hello/print/print_display.md:38
17471751msgid ""
@@ -1750,55 +1754,64 @@ msgid ""
17501754"`Vec<T>` or for any other generic containers. `fmt::Debug` must then be used "
17511755"for these generic cases."
17521756msgstr ""
1757+ "No, porque no hay un estilo ideal para todos los tipos y la biblioteca `std` "
1758+ "no presume dictar uno. `fmt::Display` no se implementa para "
1759+ "`Vec<T>` o para cualquier otro contenedor genérico. `Fmt::Debug` debe usarse "
1760+ "para estos casos genéricos" .
17531761
17541762#: src/hello/print/print_display.md:43
17551763msgid ""
17561764"This is not a problem though because for any new _container_ type which is "
17571765"_not_ generic, `fmt::Display` can be implemented."
17581766msgstr ""
1767+ "Sin embargo, esto no es un problema porque para cualquier nuevo tipo _contenedor_ que sea"
1768+ "_no_ genérico, se puede implementar `fmt::Display` " .
17591769
17601770#: src/hello/print/print_display.md:47
17611771msgid "// Import `fmt`\n"
1762- msgstr ""
1772+ msgstr "// Importar `fmt`\n "
17631773
17641774#: src/hello/print/print_display.md:48
17651775msgid ""
17661776"// A structure holding two numbers. `Debug` will be derived so the results "
17671777"can\n"
17681778"// be contrasted with `Display`.\n"
17691779msgstr ""
1780+ "// Una estructura que contiene dos números. Se derivará `Debug` para que los resultados"
1781+ "puedan"
1782+ "// ser contrastados con `Display`. \ n "
17701783
17711784#: src/hello/print/print_display.md:53
17721785msgid "// Implement `Display` for `MinMax`.\n"
1773- msgstr ""
1786+ msgstr "// Implementa `Display` para `MinMax`.\n "
17741787
17751788#: src/hello/print/print_display.md:57
17761789msgid "// Use `self.number` to refer to each positional data point.\n"
1777- msgstr ""
1790+ msgstr "// Usa `self.number` para referirte a cada dato posicional.\n "
17781791
17791792#: src/hello/print/print_display.md:58
17801793msgid "\" ({}, {})\" "
17811794msgstr ""
17821795
17831796#: src/hello/print/print_display.md:61
17841797msgid "// Define a structure where the fields are nameable for comparison.\n"
1785- msgstr ""
1798+ msgstr "// Define una estructura donde los campos se puedan nombrar para compararse.\n "
17861799
17871800#: src/hello/print/print_display.md:68
17881801msgid "// Similarly, implement `Display` for `Point2D`.\n"
1789- msgstr ""
1802+ msgstr "// Similarmente, implementa `Display` para `Point2D` "
17901803
17911804#: src/hello/print/print_display.md:72
17921805msgid "// Customize so only `x` and `y` are denoted.\n"
1793- msgstr ""
1806+ msgstr "// Personalízalo para que sólo `x` y `y` sean denotados.\n "
17941807
17951808#: src/hello/print/print_display.md:73
17961809msgid "\" x: {}, y: {}\" "
17971810msgstr ""
17981811
17991812#: src/hello/print/print_display.md:80
18001813msgid "\" Compare structures:\" "
1801- msgstr ""
1814+ msgstr "\" Compara estructuras: \" "
18021815
18031816#: src/hello/print/print_display.md:81 src/hello/print/print_display.md:94
18041817msgid "\" Display: {}\" "
@@ -1810,18 +1823,21 @@ msgstr ""
18101823
18111824#: src/hello/print/print_display.md:87
18121825msgid "\" The big range is {big} and the small is {small}\" "
1813- msgstr ""
1826+ msgstr "\" El rango grande es {big} y el pequeño es {small} \" "
18141827
18151828#: src/hello/print/print_display.md:93
18161829msgid "\" Compare points:\" "
1817- msgstr ""
1830+ msgstr "\" Compara Puntos: \" "
18181831
18191832#: src/hello/print/print_display.md:97
18201833msgid ""
18211834"// Error. Both `Debug` and `Display` were implemented, but `{:b}`\n"
18221835" // requires `fmt::Binary` to be implemented. This will not work.\n"
18231836" // println!(\" What does Point2D look like in binary: {:b}?\" , point);\n"
18241837msgstr ""
1838+ "// Error. Ambos `Debug` y `Display` fueron implementados, pero `{:b}`\n"
1839+ " // requiere implementar `fmt::Binary`. Esto no funcionará. \ n "
1840+ " // println!(\" ¿Cómo se ve el Punto2D en binario: {:b}? \" , point);\n"
18251841
18261842#: src/hello/print/print_display.md:103
18271843msgid ""
@@ -1831,13 +1847,21 @@ msgid ""
18311847"implementation. This is detailed further in [`std::fmt`](https://doc.rust-"
18321848"lang.org/std/fmt/)."
18331849msgstr ""
1850+ "Entonces, `fmt::Display` se ha implementado pero `fmt::Binary` no, y"
1851+ "por lo tanto, no se puede usar. `std::fmt` tiene muchos de estos [`traits`](https://doc" .
1852+ "rust-lang.org/std/fmt/#formatting-traits) y cada uno requiere su"
1853+ "implementación. Esto se detalla aún más en [`std::fmt`](https://doc.rust-"
1854+ "lang.org/std/fmt/)" .
18341855
18351856#: src/hello/print/print_display.md:109
18361857msgid ""
18371858"After checking the output of the above example, use the `Point2D` struct as "
18381859"a guide to add a `Complex` struct to the example. When printed in the same "
18391860"way, the output should be:"
18401861msgstr ""
1862+ "Después de verificar la salida del ejemplo anterior, use la estructura `Point2D` como "
1863+ "una guía para agregar una estructura `Complex` al ejemplo. Cuando se imprime de la misma manera"
1864+ ", la salida debería ser:"
18411865
18421866#: src/hello/print/print_display.md:120
18431867msgid ""
@@ -1846,6 +1870,10 @@ msgid ""
18461870"structs.md), [`trait`](https://doc.rust-lang.org/std/fmt/#formatting-"
18471871"traits), and [`use`](../../mod/use.md)"
18481872msgstr ""
1873+ "[`derive`](../../trait/derive.md), [`std::fmt`](https://doc.rust-lang.org/"
1874+ "std/fmt/), [`macros`](../../macros.md), [`struct`](../../custom_types/"
1875+ "structs.md), [`trait`](https://doc.rust-lang.org/std/fmt/#formatting-"
1876+ "traits), y [`use`](../../mod/use.md)"
18491877
18501878#: src/hello/print/print_display/testcase_list.md:3
18511879msgid ""
@@ -1854,36 +1882,46 @@ msgid ""
18541882"a `fmt::Result`. Proper handling of this requires dealing with _all_ the "
18551883"results. Rust provides the `?` operator for exactly this purpose."
18561884msgstr ""
1885+ "Implementar `fmt::Display` para una estructura donde los elementos deben ser cada uno "
1886+ "manejados secuencialmente es complicado. El problema es que cada `write!` genera "
1887+ "un `fmt::Result`. El manejo adecuado de esto requiere tratar con _todos_ los"
1888+ "resultados. Rust proporciona el operador `?` para exactamente este propósito" .
18571889
18581890#: src/hello/print/print_display/testcase_list.md:8
18591891msgid "Using `?` on `write!` looks like this:"
1860- msgstr ""
1892+ msgstr "Usar `?` con `write!` se ve así: "
18611893
18621894#: src/hello/print/print_display/testcase_list.md:11
18631895msgid ""
18641896"// Try `write!` to see if it errors. If it errors, return\n"
18651897"// the error. Otherwise continue.\n"
18661898msgstr ""
1899+ "// Usa `write!` para ver si falla. Si hay errores, regresa\n"
1900+ "// el error. En otro caso, continúa.\n"
18671901
18681902#: src/hello/print/print_display/testcase_list.md:16
18691903msgid ""
18701904"With `?` available, implementing `fmt::Display` for a `Vec` is "
18711905"straightforward:"
18721906msgstr ""
1907+ "Si disponemos de `?`, implementar `fmt::Display` para un `Vec` es "
1908+ "directo:"
18731909
18741910#: src/hello/print/print_display/testcase_list.md:20
18751911msgid "// Import the `fmt` module.\n"
1876- msgstr ""
1912+ msgstr "// Importar el módulo `fmt`.\n "
18771913
18781914#: src/hello/print/print_display/testcase_list.md:21
18791915msgid "// Define a structure named `List` containing a `Vec`.\n"
1880- msgstr ""
1916+ msgstr "// Define una estructura llamada `List` que contiene un `Vec`.\n "
18811917
18821918#: src/hello/print/print_display/testcase_list.md:27
18831919msgid ""
18841920"// Extract the value using tuple indexing,\n"
18851921" // and create a reference to `vec`.\n"
18861922msgstr ""
1923+ "// Extrae el valor usando indexación de tuplas,\n"
1924+ " // y crea una referencia a `vec`.\n"
18871925
18881926#: src/hello/print/print_display/testcase_list.md:31
18891927msgid "\" [\" "
@@ -1894,20 +1932,24 @@ msgid ""
18941932"// Iterate over `v` in `vec` while enumerating the iteration\n"
18951933" // count in `count`.\n"
18961934msgstr ""
1935+ "// Itera sobre `v` en un `vec` mientras enumeras la cuenta\n"
1936+ " // de la iteración en `count`.\n"
18971937
18981938#: src/hello/print/print_display/testcase_list.md:36
18991939msgid ""
19001940"// For every element except the first, add a comma.\n"
19011941" // Use the ? operator to return on errors.\n"
19021942msgstr ""
1943+ "// Para cada element excepto el primero, agrega una coma.\n"
1944+ " // Usa el operador ? para regresar errroes.\n"
19031945
19041946#: src/hello/print/print_display/testcase_list.md:38 src/std/str.md:36
19051947msgid "\" , \" "
19061948msgstr ""
19071949
19081950#: src/hello/print/print_display/testcase_list.md:42
19091951msgid "// Close the opened bracket and return a fmt::Result value.\n"
1910- msgstr ""
1952+ msgstr "// Cierra la llave abierta y regresa un valor de `fmt::Result`.\n "
19111953
19121954#: src/hello/print/print_display/testcase_list.md:43
19131955msgid "\" ]\" "
@@ -1918,6 +1960,8 @@ msgid ""
19181960"Try changing the program so that the index of each element in the vector is "
19191961"also printed. The new output should look like this:"
19201962msgstr ""
1963+ "Intente cambiar el programa para que el índice de cada elemento en el vector sea"
1964+ "también impreso. La nueva salida debería verse así:"
19211965
19221966#: src/hello/print/print_display/testcase_list.md:64
19231967msgid ""
@@ -1926,10 +1970,14 @@ msgid ""
19261970"structs.md), [`?`](../../../std/result/question_mark.md), and [`vec!`]"
19271971"(../../../std/vec.md)"
19281972msgstr ""
1973+ "[`for`](../../../flow_control/for.md), [`ref`](../../../scope/borrow/ref."
1974+ "md), [`Result`](../../../std/result.md), [`struct`](../../../custom_types/"
1975+ "structs.md), [`?`](../../../std/result/question_mark.md), y [`vec!`]"
1976+ "(../../../std/vec.md)"
19291977
19301978#: src/hello/print/fmt.md:3
19311979msgid "We've seen that formatting is specified via a _format string_:"
1932- msgstr ""
1980+ msgstr "Hemos visto que este formato se especifica via una _cadena de formato_: "
19331981
19341982#: src/hello/print/fmt.md:5
19351983msgid "`format!(\" {}\" , foo)` -> `\" 3735928559\" `"
@@ -1950,6 +1998,8 @@ msgid ""
19501998"The same variable (`foo`) can be formatted differently depending on which "
19511999"_argument type_ is used: `X` vs `o` vs _unspecified_."
19522000msgstr ""
2001+ "La misma variable (`foo`) puede formatearse de manera diferente dependiendo de cuál sea "
2002+ "_tipo de argumento_ utilizado: `X` vs `o` vs _no especificado_" .
19532003
19542004#: src/hello/print/fmt.md:12
19552005msgid ""
@@ -1958,20 +2008,23 @@ msgid ""
19582008"which handles cases where the argument type is left unspecified: `{}` for "
19592009"instance."
19602010msgstr ""
2011+ "Esta funcionalidad de formato se implementa a través de traits, y hay "
2012+ "trait para cada tipo de argumento. El trait de formato más común es la `Display`, " ,
2013+ "que maneja casos en los que el tipo de argumento se deja sin especificar: `{}`, por ejemplo."
19612014
19622015#: src/hello/print/fmt.md:21
19632016msgid "// Latitude\n"
1964- msgstr ""
2017+ msgstr "// Latitude\n "
19652018
19662019#: src/hello/print/fmt.md:23
19672020msgid "// Longitude\n"
1968- msgstr ""
2021+ msgstr "// Longitude\n "
19692022
19702023#: src/hello/print/fmt.md:28
19712024msgid ""
19722025"// `f` is a buffer, and this method must write the formatted string into "
19732026"it.\n"
1974- msgstr ""
2027+ msgstr "// `f` es un búfer, y este método se usa para formatear y meterle una cadena.\n "
19752028
19762029#: src/hello/print/fmt.md:30
19772030msgid "'N'"
@@ -1994,6 +2047,8 @@ msgid ""
19942047"// `write!` is like `format!`, but it will write the formatted string\n"
19952048" // into a buffer (the first argument).\n"
19962049msgstr ""
2050+ "// `write!` es como `format!`, pero escribirá la cadena formateada\n"
2051+ " // al búfer (el primer argumento).\n"
19972052
19982053#: src/hello/print/fmt.md:35
19992054msgid "\" {}: {:.3}°{} {:.3}°{}\" "
@@ -2016,6 +2071,8 @@ msgid ""
20162071"// Switch this to use {} once you've added an implementation\n"
20172072" // for fmt::Display.\n"
20182073msgstr ""
2074+ "// Cambia esto a {} una vez que hayas añadido una implementación\n"
2075+ " // para fmt::Display.\n"
20192076
20202077#: src/hello/print/fmt.md:62 src/primitives/tuples.md:60
20212078#: src/custom_types/structs.md:47 src/types/inference.md:23
@@ -2032,16 +2089,21 @@ msgid ""
20322089"std/fmt/#formatting-traits) and their argument types in the [`std::fmt`]"
20332090"(https://doc.rust-lang.org/std/fmt/) documentation."
20342091msgstr ""
2092+ "Puede ver una [lista completa de traits de formato](https://doc.rust-lang.org/"
2093+ "std/fmt/#formatting-traits) y sus tipos de argumentos en la documentación de [`std::fmt`]"
2094+ "(https://doc.rust-lang.org/std/fmt/)."
20352095
20362096#: src/hello/print/fmt.md:72
20372097msgid ""
20382098"Add an implementation of the `fmt::Display` trait for the `Color` struct "
20392099"above so that the output displays as:"
20402100msgstr ""
2101+ "Agrega una implementación del trait `fmt::Display` para la estructura `Color`"
2102+ "arriba para que la salida se muestre como:"
20412103
20422104#: src/hello/print/fmt.md:81
20432105msgid "Three hints if you get stuck:"
2044- msgstr ""
2106+ msgstr "Tres pistas por si te atoras: "
20452107
20462108#: src/hello/print/fmt.md:83
20472109msgid ""
0 commit comments