From 53707c594344bc1e885df69b79a9d64060a73dfb Mon Sep 17 00:00:00 2001 From: Henri Fontana Date: Tue, 25 Jul 2023 01:34:05 -0700 Subject: [PATCH] pt-BR: Review / update of Android course (#1017) * pt-BR: Catches up with latest PRs on the original EN material * pt-BR: Review / update of the Android course. --- po/pt-BR.po | 829 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 529 insertions(+), 300 deletions(-) diff --git a/po/pt-BR.po b/po/pt-BR.po index d2898600..39b872c4 100644 --- a/po/pt-BR.po +++ b/po/pt-BR.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Comprehensive Rust 🦀\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2023-07-18 10:33-0700\n" +"PO-Revision-Date: 2023-07-24 10:50-0700\n" "Last-Translator: \n" "Language-Team: \n" "Language: pt_BR\n" @@ -221,7 +221,7 @@ msgstr "Copia e Clonagem" #: src/SUMMARY.md:61 msgid "Borrowing" -msgstr "Empréstimo" +msgstr "Empréstimo (Borrowing)" #: src/SUMMARY.md:62 msgid "Shared and Unique Borrows" @@ -609,15 +609,15 @@ msgstr "Configurar" #: src/SUMMARY.md:187 msgid "Build Rules" -msgstr "Regras de Construção" +msgstr "Regras de Construção (Build)" #: src/SUMMARY.md:188 msgid "Binary" -msgstr "Binário" +msgstr "Binários do Rust" #: src/SUMMARY.md:189 msgid "Library" -msgstr "Biblioteca" +msgstr "Bibliotecas do Rust" #: src/SUMMARY.md:190 msgid "AIDL" @@ -625,7 +625,7 @@ msgstr "AIDL" #: src/SUMMARY.md:191 msgid "Interface" -msgstr "Interface" +msgstr "Interfaces AIDL" #: src/SUMMARY.md:192 msgid "Implementation" @@ -1190,7 +1190,7 @@ msgstr "" "Se você sabe programar em uma linguagem de tipagem dinâmica, como Python ou\n" "JavaScript, então você também será capaz de acompanhar." -#: src/welcome.md:50 src/cargo.md:16 src/cargo/rust-ecosystem.md:19 +#: src/welcome.md:50 src/cargo.md:14 src/cargo/rust-ecosystem.md:19 #: src/cargo/code-samples.md:22 src/cargo/running-locally.md:68 #: src/welcome-day-1.md:14 src/welcome-day-1/what-is-rust.md:19 #: src/hello-world.md:20 src/hello-world/small-example.md:21 src/why-rust.md:9 @@ -1204,7 +1204,7 @@ msgstr "" #: src/basic-syntax/variables.md:15 src/basic-syntax/type-inference.md:24 #: src/basic-syntax/static-and-const.md:47 #: src/basic-syntax/scopes-shadowing.md:23 src/memory-management/stack.md:26 -#: src/memory-management/rust.md:12 src/ownership/move-semantics.md:20 +#: src/memory-management/rust.md:12 src/ownership/move-semantics.md:19 #: src/ownership/moves-function-calls.md:18 src/ownership/copy-clone.md:33 #: src/ownership/borrowing.md:25 src/ownership/shared-unique-borrows.md:23 #: src/ownership/lifetimes-function-calls.md:27 @@ -1212,7 +1212,7 @@ msgstr "" #: src/exercises/day-1/afternoon.md:9 src/exercises/day-1/book-library.md:100 #: src/structs.md:29 src/structs/tuple-structs.md:35 #: src/structs/field-shorthand.md:25 src/enums.md:32 -#: src/enums/variant-payloads.md:33 src/enums/sizes.md:27 src/methods.md:28 +#: src/enums/variant-payloads.md:33 src/enums/sizes.md:26 src/methods.md:28 #: src/methods/receiver.md:22 src/methods/example.md:44 #: src/pattern-matching.md:23 src/pattern-matching/destructuring-enums.md:33 #: src/pattern-matching/destructuring-structs.md:21 @@ -1227,8 +1227,8 @@ msgstr "" #: src/control-flow/match-expressions.md:26 src/std.md:23 #: src/std/option-result.md:16 src/std/string.md:28 src/std/vec.md:35 #: src/std/hashmap.md:36 src/std/box.md:32 src/std/box-recursive.md:31 -#: src/std/rc.md:29 src/modules.md:26 src/modules/visibility.md:37 -#: src/modules/filesystem.md:42 src/exercises/day-2/afternoon.md:5 +#: src/std/rc.md:30 src/modules.md:26 src/modules/visibility.md:37 +#: src/modules/filesystem.md:35 src/exercises/day-2/afternoon.md:5 #: src/generics/data-types.md:19 src/generics/methods.md:23 #: src/traits/trait-objects.md:70 src/traits/default-methods.md:30 #: src/traits/trait-bounds.md:33 src/traits/impl-trait.md:21 @@ -1305,7 +1305,7 @@ msgstr "" "o instrutor deve\n" "cobrir quanto respostas a perguntas típicas que surgem em sala de aula." -#: src/welcome.md:56 src/cargo.md:28 src/cargo/rust-ecosystem.md:71 +#: src/welcome.md:56 src/cargo.md:26 src/cargo/rust-ecosystem.md:71 #: src/cargo/code-samples.md:35 src/cargo/running-locally.md:74 #: src/welcome-day-1.md:42 src/welcome-day-1/what-is-rust.md:29 #: src/hello-world.md:43 src/hello-world/small-example.md:46 src/why-rust.md:24 @@ -1319,7 +1319,7 @@ msgstr "" #: src/basic-syntax/variables.md:20 src/basic-syntax/type-inference.md:48 #: src/basic-syntax/static-and-const.md:54 #: src/basic-syntax/scopes-shadowing.md:39 src/memory-management/stack.md:49 -#: src/memory-management/rust.md:18 src/ownership/move-semantics.md:26 +#: src/memory-management/rust.md:18 src/ownership/move-semantics.md:29 #: src/ownership/moves-function-calls.md:26 src/ownership/copy-clone.md:51 #: src/ownership/borrowing.md:51 src/ownership/shared-unique-borrows.md:29 #: src/ownership/lifetimes-function-calls.md:60 @@ -1327,7 +1327,7 @@ msgstr "" #: src/exercises/day-1/afternoon.md:15 src/exercises/day-1/book-library.md:104 #: src/structs.md:42 src/structs/tuple-structs.md:44 #: src/structs/field-shorthand.md:72 src/enums.md:42 -#: src/enums/variant-payloads.md:45 src/enums/sizes.md:155 src/methods.md:41 +#: src/enums/variant-payloads.md:45 src/enums/sizes.md:154 src/methods.md:41 #: src/methods/receiver.md:28 src/methods/example.md:53 #: src/pattern-matching.md:35 src/pattern-matching/destructuring-enums.md:39 #: src/pattern-matching/destructuring-structs.md:29 @@ -1342,8 +1342,8 @@ msgstr "" #: src/control-flow/match-expressions.md:33 src/std.md:31 #: src/std/option-result.md:25 src/std/string.md:42 src/std/vec.md:49 #: src/std/hashmap.md:66 src/std/box.md:39 src/std/box-recursive.md:41 -#: src/std/rc.md:69 src/modules.md:32 src/modules/visibility.md:48 -#: src/modules/filesystem.md:71 src/exercises/day-2/afternoon.md:11 +#: src/std/rc.md:70 src/modules.md:32 src/modules/visibility.md:48 +#: src/modules/filesystem.md:62 src/exercises/day-2/afternoon.md:11 #: src/generics/data-types.md:25 src/generics/methods.md:31 #: src/traits/trait-objects.md:83 src/traits/default-methods.md:60 #: src/traits/trait-bounds.md:50 src/traits/impl-trait.md:44 @@ -1352,7 +1352,7 @@ msgstr "" #: src/traits/operators.md:40 src/traits/closures.md:63 #: src/exercises/day-3/morning.md:11 src/error-handling/result.md:33 #: src/error-handling/try-operator.md:53 -#: src/error-handling/converting-error-types-example.md:60 +#: src/error-handling/converting-error-types-example.md:61 #: src/error-handling/deriving-error-enums.md:45 #: src/error-handling/dynamic-errors.md:41 #: src/error-handling/error-contexts.md:42 src/unsafe.md:32 @@ -1831,30 +1831,21 @@ msgid "## Installation" msgstr "## Instalação" #: src/cargo.md:10 -msgid "> TL;DR: Visit [rustup.rs][1]." -msgstr "> TL;DR: Veja [rustup.rs][1]." +msgid "> **Please follow the instructions on .**" +msgstr "> **Por favor, siga as instruções em .**" #: src/cargo.md:12 msgid "" -"You can follow the instructions to install cargo and rust compiler, among " -"other standard ecosystem tools with the [rustup][1] tool, which is " -"maintained by the Rust Foundation." +"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 "" -"Você pode seguir as instruções para instalar o cargo e o compilador do Rust, " -"entre outras ferramentas padrão do ecossistema, com a ferramenta [rustup]" -"[1], que é mantida pela Rust Foundation." +"Isso fornecerá a ferramenta de compilação Cargo (`cargo`) e o compilador " +"Rust (`rustc`). Você também obterá o `rustup`, um utilitário de linha de " +"comando que você pode usar para instalar/alternar ferramentas, configurar " +"compilação cruzada, etc." -#: src/cargo.md:14 -msgid "" -"Along with cargo and rustc, Rustup will install itself as a command line " -"utility that you can use to install/switch toolchains, setup cross " -"compilation, etc." -msgstr "" -"Juntamente com cargo e rustc, o Rustup se instalará como um utilitário de " -"linha de comando que você pode usar para instalar/alternar ferramentas, " -"configurar compilação cruzada, etc." - -#: src/cargo.md:18 +#: src/cargo.md:16 msgid "" "* On Debian/Ubuntu, you can also install Cargo, the Rust source and the " "[Rust formatter][6] via `apt`. However, this gets you an outdated rust " @@ -1865,7 +1856,7 @@ msgstr "" "versão desatualizada do Rust e pode levar a comportamentos inesperados. O " "comando seria:" -#: src/cargo.md:20 +#: src/cargo.md:18 msgid "" "```shell\n" " sudo apt install cargo rust-src rustfmt\n" @@ -1875,7 +1866,7 @@ msgstr "" "sudo apt install cargo rust-src rustfmt\n" "```" -#: src/cargo.md:24 +#: src/cargo.md:22 msgid "" "* We suggest using [VS Code][2] to edit the code (but any LSP compatible " "editor works with rust-analyzer[3]).\n" @@ -3856,6 +3847,7 @@ msgstr "" "* Veremos muito mais sobre métodos no exercício de hoje e na aula de amanhã." #: src/basic-syntax/methods.md:34 +#, fuzzy msgid "" "- Add a static method called `Rectangle::new` and call this from `main`:\n" "\n" @@ -3865,14 +3857,14 @@ msgid "" " }\n" " ```\n" "\n" -"- While _technically_, rust does not have custom constructors, static " +"- While _technically_, Rust does not have custom constructors, static " "methods are commonly used to initialize structs (but don't have to).\n" " The actual constructor, `Rectangle { width, height }`, could be called " "directly. See the [Rustnomicon](https://doc.rust-lang.org/nomicon/" "constructors.html).\n" "\n" -"- Add a `Rectangle::new_square(width: u32)` constructor to illustrate that " -"such static methods can take arbitrary parameters." +"- Add a `Rectangle::square(width: u32)` constructor to illustrate that such " +"static methods can take arbitrary parameters." msgstr "" "- Adicione um método estático chamado `Retangulo::new` e o chame a partir de " "`main`:\n" @@ -3890,7 +3882,7 @@ msgstr "" "ser chamado diretamente. Veja o [Rustnomicon](https://doc.rust-lang.org/" "nomicon/constructors.html).\n" "\n" -"- Adicione um construtor `Rectangle::novo_quadrado(largura: u32)` para " +"- Adicione um construtor `Retangulo::novo_quadrado(largura: u32)` para " "demonstrar que tais métodos estáticos podem ter parâmetros arbitrários." #: src/basic-syntax/functions-interlude.md:1 @@ -5202,8 +5194,9 @@ msgid "" " * Garbage collection pauses.\n" " * Destructor delays.\n" "* Scope-based like C++:\n" -" * Complex, opt-in by programmer.\n" -" * Potential for use-after-free.\n" +" * Complex, opt-in by programmer (on C++).\n" +" * Circular references can lead to memory leaks\n" +" * Potential runtime overhead\n" "* Compiler-enforced and scope-based like Rust:\n" " * Some upfront complexity.\n" " * Can reject valid programs." @@ -5217,7 +5210,8 @@ msgstr "" " * Atrasos na execução de destrutores.\n" "* Baseado em escopo como C++:\n" " * Complexo, o programador deve optar em utilizá-las.\n" -" * Potencial para uso após a liberação (_use-after-free_).\n" +" * Referências circulares podem causar vazamentos de memória\n" +" * Potencial impacto negativo em desempenho em tempo de execução\n" "* Imposto pelo compilador e baseado em escopo como Rust:\n" " * Alguma complexidade inicial.\n" " * Pode rejeitar programas válidos." @@ -5276,7 +5270,7 @@ msgid "# Move Semantics" msgstr "# Semântica do `Move` (Mover)" #: src/ownership/move-semantics.md:3 -msgid "An assignment will transfer ownership between variables:" +msgid "An assignment will transfer _ownership_ between variables:" msgstr "Uma atribuição transferirá o _ownership_ entre variáveis:" #: src/ownership/move-semantics.md:5 @@ -5302,28 +5296,37 @@ msgstr "" #: src/ownership/move-semantics.md:14 msgid "" "* The assignment of `s1` to `s2` transfers ownership.\n" -"* The data was _moved_ from `s1` and `s1` is no longer accessible.\n" -"* When `s1` goes out of scope, nothing happens: it has no ownership.\n" +"* When `s1` goes out of scope, nothing happens: it does not own anything.\n" "* When `s2` goes out of scope, the string data is freed.\n" "* There is always _exactly_ one variable binding which owns a value." msgstr "" "* A atribuição de `s1` a `s2` transfere o _ownership_.\n" -"* Os dados foram _movidos_ de `s1` e `s1` não está mais acessível.\n" "* Quando `s1` sai do escopo, nada acontece: ele não tem _ownership_.\n" "* Quando `s2` sai do escopo, os dados da string são liberados.\n" -"* Há sempre _exatamente_ uma associação de variável que possui (owns) um " -"valor." +"* Há sempre _exatamente_ uma associação de variável que possui (\"_owns_\") " +"um valor." -#: src/ownership/move-semantics.md:22 +#: src/ownership/move-semantics.md:21 msgid "" "* Mention that this is the opposite of the defaults in C++, which copies by " "value unless you use `std::move` (and the move constructor is defined!).\n" "\n" +"* It is only the ownership that moves. Whether any machine code is generated " +"to manipulate the data itself is a matter of optimization, and such copies " +"are aggressively optimized away.\n" +"\n" +"* Simple values (such as integers) can be marked `Copy` (see later slides).\n" +"\n" "* In Rust, clones are explicit (by using `clone`)." msgstr "" "* Mencione que isso é o oposto dos _defaults_ (padrões) em C++, que copia " -"por valor, a menos que você use `std::move` (e o construtor `move` esteja " +"por valor, a menos que você use `std::move` (e seu construtor esteja " "definido!).\n" +"* Apenas o _ownership_ é movido. A geração de código de máquina para " +"manipular os dados é uma questão de otimização, e essas cópias são " +"agressivamente otimizadas.\n" +"* Valores simples (tais como inteiros) podem ser marcados como `Copy` " +"(cópia) (veja slides mais adiante).\n" "* No Rust, clones são explícitos (utilizando-se `clone`)." #: src/ownership/moved-strings-rust.md:1 @@ -5737,7 +5740,7 @@ msgstr "" #: src/ownership/borrowing.md:1 msgid "# Borrowing" -msgstr "# _Borrowing_ (Empréstimo)" +msgstr "# Empréstimo (_Borrowing_)" #: src/ownership/borrowing.md:3 msgid "" @@ -5799,9 +5802,10 @@ msgstr "Notas sobre os retornos da pilha:" msgid "" "* Demonstrate that the return from `add` is cheap because the compiler can " "eliminate the copy operation. Change the above code to print stack addresses " -"and run it on the [Playground]. In the \"DEBUG\" optimization level, the " -"addresses should change, while they stay the same when changing to the " -"\"RELEASE\" setting:\n" +"and run it on the [Playground] or look at the assembly in [Godbolt](https://" +"rust.godbolt.org/). In the \"DEBUG\" optimization level, the addresses " +"should change, while they stay the same when changing to the \"RELEASE\" " +"setting:\n" "\n" " ```rust,editable\n" " #[derive(Debug)]\n" @@ -5813,7 +5817,7 @@ msgid "" " p\n" " }\n" "\n" -" fn main() {\n" +" pub fn main() {\n" " let p1 = Point(3, 4);\n" " let p2 = Point(10, 20);\n" " let p3 = add(&p1, &p2);\n" @@ -5829,9 +5833,10 @@ msgid "" msgstr "" "* Demonstre que o retorno de `somar` é barato porque o compilador pode " "eliminar a operação de cópia. Modifique o código acima para imprimir " -"endereços da pilha e execute-o no [Playground]. No nível de otimização " -"\"DEBUG\", os endereços devem mudar, enquanto eles permanecem os mesmos " -"quando a configuração é alterada para \"RELEASE\":\n" +"endereços da pilha e execute-o no [Playground] ou veja o código _assembly_ " +"em [Godbolt](https://rust.godbolt.org/). No nível de otimização \"DEBUG\", " +"os endereços devem mudar, enquanto eles permanecem os mesmos quando a " +"configuração é alterada para \"RELEASE\":\n" "\n" "```rust,editable\n" "#[derive(Debug)]\n" @@ -5841,7 +5846,7 @@ msgstr "" " Ponto(p1.0 + p2.0, p1.1 + p2.1)\n" "}\n" "\n" -" fn main() {\n" +" pub fn main() {\n" " let p1 = Ponto(3, 4);\n" " let p2 = Ponto(10, 20);\n" " let p3 = somar(&p1, &p2);\n" @@ -6791,7 +6796,7 @@ msgstr "" "}\n" "```" -#: src/structs.md:31 src/enums.md:34 src/enums/sizes.md:29 src/methods.md:30 +#: src/structs.md:31 src/enums.md:34 src/enums/sizes.md:28 src/methods.md:30 #: src/methods/example.md:46 src/pattern-matching.md:25 #: src/pattern-matching/match-guards.md:22 src/control-flow/blocks.md:43 msgid "Key Points:" @@ -7313,13 +7318,12 @@ msgstr "" #: src/enums/sizes.md:5 msgid "" "```rust,editable\n" +"use std::any::type_name;\n" "use std::mem::{align_of, size_of};\n" "\n" -"macro_rules! dbg_size {\n" -" ($t:ty) => {\n" -" println!(\"{}: size {} bytes, align: {} bytes\",\n" -" stringify!($t), size_of::<$t>(), align_of::<$t>());\n" -" };\n" +"fn dbg_size() {\n" +" println!(\"{}: size {} bytes, align: {} bytes\",\n" +" type_name::(), size_of::(), align_of::());\n" "}\n" "\n" "enum Foo {\n" @@ -7328,18 +7332,17 @@ msgid "" "}\n" "\n" "fn main() {\n" -" dbg_size!(Foo);\n" +" dbg_size::();\n" "}\n" "```" msgstr "" "```rust,editable\n" +"use std::any::type_name;\n" "use std::mem::{align_of, size_of};\n" "\n" -"macro_rules! dbg_size {\n" -" ($t:ty) => {\n" -" println!(\"{}: tamanho {} bytes, alinhamento: {} bytes\",\n" -" stringify!($t), size_of::<$t>(), align_of::<$t>());\n" -" };\n" +"fn dbg_size() {\n" +" println!(\"{}: tamanho {} bytes, alinhamento: {} bytes\",\n" +" type_name::(), size_of::(), align_of::());\n" "}\n" "\n" "enum Foo {\n" @@ -7348,11 +7351,11 @@ msgstr "" "}\n" "\n" "fn main() {\n" -" dbg_size!(Foo);\n" +" dbg_size::();\n" "}\n" "```" -#: src/enums/sizes.md:25 +#: src/enums/sizes.md:24 msgid "" "* See the [Rust Reference](https://doc.rust-lang.org/reference/type-layout." "html)." @@ -7360,7 +7363,7 @@ msgstr "" "* Consulte a [Referência do Rust](https://doc.rust-lang.org/reference/type-" "layout.html)." -#: src/enums/sizes.md:31 +#: src/enums/sizes.md:30 msgid "" " * Internally Rust is using a field (discriminant) to keep track of the enum " "variant.\n" @@ -9241,13 +9244,13 @@ msgstr "" #: src/control-flow/while-let-expressions.md:17 msgid "" -"Here the iterator returned by `v.iter()` will return a `Option` on " +"Here the iterator returned by `v.into_iter()` will return a `Option` on " "every\n" "call to `next()`. It returns `Some(x)` until it is done, after which it " "will\n" "return `None`. The `while let` lets us keep iterating through all items." msgstr "" -"Aqui o iterador retornado por `v.iter()` retornará uma `Option` em " +"Aqui o iterador retornado por `v.into_iter()` retornará uma `Option` em " "cada\n" "chamada para `next()`. Ele retorna `Some(x)` até que seja concluído e, em " "seguida, retorna \n" @@ -10355,20 +10358,21 @@ msgid "" "* If you need to mutate the data inside an `Rc`, you will need to wrap the " "data in\n" " a type such as [`Cell` or `RefCell`][2].\n" -"* See [`Arc`][3] if you are in a multi-threaded context.\n" -"* You can *downgrade* a shared pointer into a [`Weak`][4] pointer to create " +"* See [`Arc`][3] and [`Mutex`][4] if you are in a multi-threaded context.\n" +"* You can *downgrade* a shared pointer into a [`Weak`][5] pointer to create " "cycles\n" " that will get dropped." msgstr "" -"* Se você precisar alterar os dados dentro de um `Rc`, precisará agrupar os " -"dados em\n" +"* Se você precisar alterar os dados dentro de um `Rc`, você precisará " +"agrupar os dados em\n" " um tipo como [`Cell` ou `RefCell`][2].\n" -"* Veja [`Arc`][3] se você estiver em um contexto multi-thread.\n" -"* Você pode *downgrade* um ponteiro compartilhado para um ponteiro [`Weak`]" -"[4] para criar ciclos\n" +"* Veja [`Arc`][3] e [`Mutex`][4] se você estiver em um contexto multi-" +"thread.\n" +"* Você pode demover (*downgrade*) um ponteiro compartilhado em um ponteiro " +"[`Weak`][5] para criar ciclos\n" " que serão descartados." -#: src/std/rc.md:31 +#: src/std/rc.md:32 msgid "" "* `Rc`'s count ensures that its contained value is valid for as long as " "there are references.\n" @@ -10405,7 +10409,7 @@ msgstr "" "ciclos que podem ser apropriadamente descartados (provavelmente combinados " "com `RefCell`)." -#: src/std/rc.md:41 +#: src/std/rc.md:42 msgid "" "```rust,editable\n" "use std::rc::{Rc, Weak};\n" @@ -10691,8 +10695,10 @@ msgid "# Filesystem Hierarchy" msgstr "# Hierarquia do Sistema de Arquivos" #: src/modules/filesystem.md:3 -msgid "The module content can be omitted:" -msgstr "O conteúdo do módulo pode ser omitido:" +msgid "" +"Omitting the module content will tell Rust to look for it in another file:" +msgstr "" +"Omitir o conteúdo do módulo dirá ao Rust para procurá-lo em outro arquivo:" #: src/modules/filesystem.md:5 msgid "" @@ -10705,34 +10711,22 @@ msgstr "" "```" #: src/modules/filesystem.md:9 -msgid "The `garden` module content is found at:" -msgstr "O conteúdo do módulo `jardim` é encontrado em:" - -#: src/modules/filesystem.md:11 msgid "" -"* `src/garden.rs` (modern Rust 2018 style)\n" -"* `src/garden/mod.rs` (older Rust 2015 style)" +"This tells rust that the `garden` module content is found at `src/garden." +"rs`.\n" +"Similarly, a `garden::vegetables` module can be found at `src/garden/" +"vegetables.rs`." msgstr "" -"* `src/jardim.rs` (estilo Rust 2018 moderno)\n" -"* `src/jardim/mod.rs` (antigo estilo Rust 2015)" +"Isso diz ao Rust que o conteúdo do módulo `jardim` pode ser encontrado em " +"`src/jardim.rs`.\n" +"Similarmente, um módulo `jardim::vegetais` pode ser encontrado em `src/" +"jardim/vegetais.rs`." -#: src/modules/filesystem.md:14 -msgid "Similarly, a `garden::vegetables` module can be found at:" -msgstr "Da mesma forma, um módulo `jardim::vegetais` pode ser encontrado em:" - -#: src/modules/filesystem.md:16 -msgid "" -"* `src/garden/vegetables.rs` (modern Rust 2018 style)\n" -"* `src/garden/vegetables/mod.rs` (older Rust 2015 style)" -msgstr "" -"* `src/jardim/vegetais.rs` (estilo Rust 2018 moderno)\n" -"* `src/jardim/vegetais/mod.rs` (antigo estilo Rust 2015)" - -#: src/modules/filesystem.md:19 +#: src/modules/filesystem.md:12 msgid "The `crate` root is in:" msgstr "A raiz `crate` está em:" -#: src/modules/filesystem.md:21 +#: src/modules/filesystem.md:14 msgid "" "* `src/lib.rs` (for a library crate)\n" "* `src/main.rs` (for a binary crate)" @@ -10740,7 +10734,7 @@ msgstr "" "* `src/lib.rs` (para um _crate_ de biblioteca)\n" "* `src/main.rs` (para um _crate_ binário)" -#: src/modules/filesystem.md:24 +#: src/modules/filesystem.md:17 msgid "" "Modules defined in files can be documented, too, using \"inner doc " "comments\".\n" @@ -10750,7 +10744,7 @@ msgstr "" "\"comentários internos de documento\" (_inner doc comments_).\n" "Estes documentam o item que os contém - neste caso, um módulo." -#: src/modules/filesystem.md:27 +#: src/modules/filesystem.md:20 msgid "" "```rust,editable,compile_fail\n" "//! This module implements the garden, including a highly performant " @@ -10784,13 +10778,17 @@ msgstr "" "pub fn colher(jardim: &mut Jardim) { todo!() }\n" "```" -#: src/modules/filesystem.md:44 +#: src/modules/filesystem.md:37 msgid "" -"* The change from `module/mod.rs` to `module.rs` doesn't preclude the use of " -"submodules in Rust 2018.\n" -" (It was mandatory in Rust 2015.)\n" +"* Before Rust 2018, modules needed to be located at `module/mod.rs` instead " +"of `module.rs`, and this is still a working alternative for editions after " +"2018.\n" "\n" -" The following is valid:\n" +"* The main reason to introduce `filename.rs` as alternative to `filename/mod." +"rs`\n" +" was because many files named `mod.rs` can be hard to distinguish in IDEs.\n" +"\n" +"* Deeper nesting can use folders, even if the main module is a file:\n" "\n" " ```ignore\n" " src/\n" @@ -10800,13 +10798,8 @@ msgid "" " └── sub_module.rs\n" " ```\n" "\n" -"* The main reason for the change is to prevent many files named `mod.rs`, " -"which can be hard\n" -" to distinguish in IDEs.\n" -"\n" -"* Rust will look for modules in `modulename/mod.rs` and `modulename.rs`, but " -"this can be changed\n" -" with a compiler directive:\n" +"* The place rust will look for modules can be changed with a compiler " +"directive:\n" "\n" " ```rust,ignore\n" " #[path = \"some/path.rs\"]\n" @@ -10817,11 +10810,17 @@ msgid "" "in a file named\n" " `some_module_test.rs`, similar to the convention in Go." msgstr "" -"* A mudança de `modulo/mod.rs` para `modulo.rs` não impede o uso de " -"submódulos no Rust 2018.\n" -" (Isto era obrigatório no Rust 2015)\n" +"* Antes do Rust 2018, os módulos precisavam estar localizados em `module/mod." +"rs` ao invés de `module.rs`, e esta ainda é uma alternativa funcional para " +"edições posteriores a 2018.\n" "\n" -" O seguinte é válido:\n" +"* A principal razão para introduzir `nome_de_arquivo.rs` como alternativa a " +"`nome_de_arquivo/mod.rs`\n" +" foi porque muitos arquivos denominados `mod.rs` podem ser difíceis de " +"distinguir em IDEs.\n" +"\n" +"* O aninhamento mais profundo pode usar pastas, mesmo que o módulo principal " +"seja um arquivo:\n" "\n" " ```ignore\n" " src/\n" @@ -10831,13 +10830,8 @@ msgstr "" " └── sub_module.rs\n" " ```\n" "\n" -"* A principal razão para a alteração é evitar muitos arquivos denominados " -"`mod.rs`, que podem ser difíceis\n" -" de distinguir em IDEs.\n" -"\n" -"* Rust procurará módulos em `modulonome/mod.rs` e `modulonome.rs`, mas isso " -"pode ser alterado\n" -" com uma diretiva de compilador:\n" +"* O local no qual o Rust irá procurar por módulos pode ser alterado por meio " +"de uma diretiva de compilador:\n" "\n" " ```rust,ignore\n" " #[caminho = \"algum/caminho.rs\"]\n" @@ -11668,11 +11662,18 @@ msgid "# Deriving Traits" msgstr "# _Traits_ Derivados" #: src/traits/deriving-traits.md:3 -msgid "You can let the compiler derive a number of traits:" -msgstr "Você pode deixar o compilador derivar uma série de traits:" +msgid "" +"Rust derive macros work by automatically generating code that implements the " +"specified traits for a data structure." +msgstr "" +"As macros `derive` do Rust funcionam gerando automaticamente o código que " +"implementa os _traits_ especificados para uma estrutura de dados." #: src/traits/deriving-traits.md:5 -#, fuzzy +msgid "You can let the compiler derive a number of traits as follows:" +msgstr "Você pode deixar o compilador derivar uma série de _traits_ tais como:" + +#: src/traits/deriving-traits.md:7 msgid "" "```rust,editable\n" "#[derive(Debug, Clone, PartialEq, Eq, Default)]\n" @@ -11690,10 +11691,18 @@ msgid "" "}\n" "```" msgstr "" +"```rust,editable\n" +"#[derive(Debug, Clone, PartialEq, Eq, Default)]\n" +"struct Jogador {\n" +" nome: String,\n" +" forca: u8,\n" +" pontos_ataque: u8,\n" +"}\n" +"\n" "fn main() {\n" " let p1 = Jogador::default();\n" " let p2 = p1.clone();\n" -" println!(\"É {:?}\\nigual a {:?}?\\nA resposta é {}!\", &p1, &p2,\n" +" println!(\"{:?} é\\nigual a {:?}?\\nA resposta é {}!\", &p1, &p2,\n" " if p1 == p2 { \"sim\" } else { \"não\" });\n" "}\n" "```" @@ -11712,9 +11721,9 @@ msgstr "" msgid "" "```rust,editable\n" "trait Equals {\n" -" fn equal(&self, other: &Self) -> bool;\n" -" fn not_equal(&self, other: &Self) -> bool {\n" -" !self.equal(other)\n" +" fn equals(&self, other: &Self) -> bool;\n" +" fn not_equals(&self, other: &Self) -> bool {\n" +" !self.equals(other)\n" " }\n" "}\n" "\n" @@ -11722,7 +11731,7 @@ msgid "" "struct Centimeter(i16);\n" "\n" "impl Equals for Centimeter {\n" -" fn equal(&self, other: &Centimeter) -> bool {\n" +" fn equals(&self, other: &Centimeter) -> bool {\n" " self.0 == other.0\n" " }\n" "}\n" @@ -11730,11 +11739,35 @@ msgid "" "fn main() {\n" " let a = Centimeter(10);\n" " let b = Centimeter(20);\n" -" println!(\"{a:?} equals {b:?}: {}\", a.equal(&b));\n" -" println!(\"{a:?} not_equals {b:?}: {}\", a.not_equal(&b));\n" +" println!(\"{a:?} equals {b:?}: {}\", a.equals(&b));\n" +" println!(\"{a:?} not_equals {b:?}: {}\", a.not_equals(&b));\n" "}\n" "```" msgstr "" +"```rust,editable\n" +"trait Equals {\n" +" fn equals(&self, other: &Self) -> bool;\n" +" fn not_equals(&self, other: &Self) -> bool {\n" +" !self.equals(other)\n" +" }\n" +"}\n" +"\n" +"#[derive(Debug)]\n" +"struct Centimetro(i16);\n" +"\n" +"impl Equals for Centimetro {\n" +" fn equals(&self, other: &Centimetro) -> bool {\n" +" self.0 == other.0\n" +" }\n" +"}\n" +"\n" +"fn main() {\n" +" let a = Centimetro(10);\n" +" let b = Centimetro(20);\n" +" println!(\"{a:?} igual a {b:?}: {}\", a.equals(&b));\n" +" println!(\"{a:?} diferente de {b:?}: {}\", a.not_equals(&b));\n" +"}\n" +"```" #: src/traits/default-methods.md:32 msgid "" @@ -11743,26 +11776,26 @@ msgid "" " implement themselves. Methods with default implementations can rely on " "required methods.\n" "\n" -"* Move method `not_equal` to a new trait `NotEqual`.\n" +"* Move method `not_equals` to a new trait `NotEquals`.\n" "\n" -"* Make `Equals` a super trait for `NotEqual`.\n" +"* Make `Equals` a super trait for `NotEquals`.\n" " ```rust,editable,compile_fail\n" -" trait NotEqual: Equals {\n" -" fn not_equal(&self, other: &Self) -> bool {\n" -" !self.equal(other)\n" +" trait NotEquals: Equals {\n" +" fn not_equals(&self, other: &Self) -> bool {\n" +" !self.equals(other)\n" " }\n" " }\n" " ```\n" "\n" -"* Provide a blanket implementation of `NotEqual` for `Equal`.\n" +"* Provide a blanket implementation of `NotEquals` for `Equals`.\n" " ```rust,editable,compile_fail\n" -" trait NotEqual {\n" -" fn not_equal(&self, other: &Self) -> bool;\n" +" trait NotEquals {\n" +" fn not_equals(&self, other: &Self) -> bool;\n" " }\n" "\n" -" impl NotEqual for T where T: Equals {\n" -" fn not_equal(&self, other: &Self) -> bool {\n" -" !self.equal(other)\n" +" impl NotEquals for T where T: Equals {\n" +" fn not_equals(&self, other: &Self) -> bool {\n" +" !self.equals(other)\n" " }\n" " }\n" " ```\n" @@ -11770,6 +11803,37 @@ msgid "" "trait for `NotEqual`.\n" " " msgstr "" +"* _Traits_ podem especificar métodos pré-implementados (padrão) e métodos " +"que os usuários são obrigados a implementar.\n" +" Os métodos com implementações padrão podem contar com os métodos " +"requeridos.\n" +"\n" +"* Mova o método `not_equals` para um novo _trait_ `NotEquals`.\n" +"\n" +"* Faça `Equals` um _super trait_ para `NotEquals`.\n" +" ```rust,editable,compile_fail\n" +" trait NotEquals: Equals {\n" +" fn not_equals(&self, other: &Self) -> bool {\n" +" !self.equals(other)\n" +" }\n" +" }\n" +" ```\n" +"\n" +"* Forneça uma implementação geral de `NotEquals` para `Equals`.\n" +" ```rust,editable,compile_fail\n" +" trait NotEquals {\n" +" fn not_equals(&self, other: &Self) -> bool;\n" +" }\n" +"\n" +" impl NotEquals for T where T: Equals {\n" +" fn not_equals(&self, other: &Self) -> bool {\n" +" !self.equals(other)\n" +" }\n" +" }\n" +" ```\n" +" * Com a implementação geral, você não precisa mais de `Equals` como um " +"_super trait_ para `NotEqual`.\n" +" " #: src/traits/trait-bounds.md:1 msgid "# Trait Bounds" @@ -11820,9 +11884,10 @@ msgstr "" #: src/traits/trait-bounds.md:35 msgid "Show a `where` clause, students will encounter it when reading code." msgstr "" +"Mostre uma cláusula `where`, os estudantes irão encontrá-la quando lerem " +"código." #: src/traits/trait-bounds.md:37 -#, fuzzy msgid "" "```rust,ignore\n" "fn duplicate(a: T) -> (T, T)\n" @@ -11833,10 +11898,14 @@ msgid "" "}\n" "```" msgstr "" -"```rust, editable\n" -"fn duplicar(a: T) -> (T, T) {\n" +"```rust,ignore\n" +"fn duplicar(a: T) -> (T, T)\n" +"where\n" +" T: Clone,\n" +"{\n" " (a.clone(), a.clone())\n" -"}" +"}\n" +"```" #: src/traits/trait-bounds.md:46 msgid "" @@ -13271,18 +13340,27 @@ msgstr "" #: src/error-handling/converting-error-types-example.md:55 msgid "" -"It is good practice for all error types to implement `std::error::Error`, " -"which requires `Debug` and\n" -"`Display`. It's generally helpful for them to implement `Clone` and `Eq` too " -"where possible, to make\n" +"It is good practice for all error types that don't need to be `no_std` to " +"implement `std::error::Error`, which requires `Debug` and `Display`. The " +"`Error` crate for `core` is only available in [nightly](https://github.com/" +"rust-lang/rust/issues/103765), so not fully `no_std` compatible yet." +msgstr "" +"É uma boa prática para todos os tipos de erro que não precisam ser `no_std` " +"implementar `std::error::Error`, que requer `Debug` e `Display`. O _crate_ " +"`Error` para `core` só está disponível em [nightly](https://github.com/rust-" +"lang/rust/issues/103765), então ainda não é totalmente compatível com " +"`no_std`." + +#: src/error-handling/converting-error-types-example.md:57 +msgid "" +"It's generally helpful for them to implement `Clone` and `Eq` too where " +"possible, to make\n" "life easier for tests and consumers of your library. In this case we can't " "easily do so, because\n" "`io::Error` doesn't implement them." msgstr "" -"É uma boa prática para todos os tipos de erro implementar `std::error::" -"Error`, que requer `Debug` e\n" -"`Display`. Geralmente é útil para eles implementar `Clone` e `Eq` também " -"quando possível, para tornar\n" +"Geralmente é útil para eles implementar `Clone` e `Eq` também quando " +"possível, para tornar\n" "mais fácil a vida para testes e consumidores da sua biblioteca. Neste caso, " "não podemos fazê-lo facilmente, porque\n" "`io::Error` não os implementa." @@ -14819,9 +14897,8 @@ msgstr "" "```" #: src/android.md:1 -#, fuzzy msgid "# Welcome to Rust in Android" -msgstr "# Bem-vindo ao Dia 1" +msgstr "# Bem-vindo ao Rust para Android" #: src/android.md:3 msgid "" @@ -14846,10 +14923,11 @@ msgid "" "that\n" "> parses some raw bytes would be ideal." msgstr "" -"> Tentaremos chamar Rust de um de seus próprios projetos hoje. Então tente\n" -"> encontrar um pequeno canto da sua base de código onde podemos mover " -"algumas linhas de código para\n" -"> Rust. Quanto menos dependências e tipos \"exóticos\", melhor. Algo que\n" +"> Hoje tentaremos chamar Rust a partir de um de seus próprios projetos. " +"Então tente\n" +"> encontrar um cantinho da sua base de código onde podemos mover algumas " +"linhas de código para\n" +"> o Rust. Quanto menos dependências e tipos \"exóticos\", melhor. Algo que\n" "> analise alguns bytes brutos seria o ideal." #: src/android/setup.md:1 @@ -14862,12 +14940,11 @@ msgid "" "have\n" "access to one or create a new one with:" msgstr "" -"Estaremos usando um dispositivo virtual Android para testar nosso código. " +"Iremos usar o um dispositivo virtual Android para testar nosso código. " "Assegure-se de ter\n" "acesso a um ou crie um novo com:" #: src/android/setup.md:6 -#, fuzzy msgid "" "```shell\n" "source build/envsetup.sh\n" @@ -14876,9 +14953,9 @@ msgid "" "```" msgstr "" "```shell\n" -"$ source build/envsetup.sh\n" -"$ launch aosp_cf_x86_64_phone-userdebug\n" -"$ acloud create\n" +"source build/envsetup.sh\n" +"lunch aosp_cf_x86_64_phone-userdebug\n" +"acloud create\n" "```" #: src/android/setup.md:12 @@ -14886,12 +14963,12 @@ msgid "" "Please see the [Android Developer\n" "Codelab](https://source.android.com/docs/setup/start) for details." msgstr "" -"Consulte o [Codelab para Desenvolvedor Android]\n" -"[https://source.android.com/docs/setup/start] para obter detalhes." +"Consulte o [Codelab para Desenvolvedor Android](https://source.android.com/" +"docs/setup/start) para maiores detalhes." #: src/android/build-rules.md:1 msgid "# Build Rules" -msgstr "# Regras de construção" +msgstr "# Regras de Construção (_Build_)" #: src/android/build-rules.md:3 msgid "The Android build system (Soong) supports Rust via a number of modules:" @@ -14934,14 +15011,14 @@ msgstr "" "`cc` e fornece variantes estáticas e compartilhadas. |\n" "| `rust_proc_macro` | Produz uma biblioteca Rust `proc-macro`. Estes são " "análogos aos plugins do compilador. |\n" -"| `rust_test` | Produz um binário de teste Rust que usa o equipamento " -"de teste Rust padrão. |\n" +"| `rust_test` | Produz um binário de teste Rust que usa a " +"funcionalidade padrão de teste do Rust. |\n" "| `rust_fuzz` | Produz um binário Rust fuzz aproveitando " "`libfuzzer`. |\n" "| `rust_protobuf` | Gera o código-fonte e produz uma biblioteca Rust que " "fornece uma interface para um _protobuf_ específico.|\n" "| `rust_bindgen` | Gera fonte e produz uma biblioteca Rust contendo " -"ligações Rust para bibliotecas C. |" +"vínculos em Rust para bibliotecas C. |" #: src/android/build-rules.md:16 msgid "We will look at `rust_binary` and `rust_library` next." @@ -14949,7 +15026,7 @@ msgstr "Veremos `rust_binary` e `rust_library` a seguir." #: src/android/build-rules/binary.md:1 msgid "# Rust Binaries" -msgstr "# Binários Rust" +msgstr "# Binários do Rust" #: src/android/build-rules/binary.md:3 msgid "" @@ -14975,8 +15052,8 @@ msgid "" "```" msgstr "" "```javascript\n" -"rust_binary{\n" -" name: \"olá_rust\",\n" +"rust_binary {\n" +" name: \"hello_rust\",\n" " crate_name: \"hello_rust\",\n" " srcs: [\"src/main.rs\"],\n" "}\n" @@ -14987,7 +15064,6 @@ msgid "_hello_rust/src/main.rs_:" msgstr "_hello_rust/src/main.rs_:" #: src/android/build-rules/binary.md:18 -#, fuzzy msgid "" "```rust\n" "//! Rust demo.\n" @@ -14998,6 +15074,9 @@ msgid "" "}\n" "```" msgstr "" +"```rust\n" +"//! Rust demo.\n" +"\n" "/// Imprime uma saudação na saída padrão.\n" "fn main() {\n" " println!(\"Olá do Rust!\");\n" @@ -15009,7 +15088,6 @@ msgid "You can now build, push, and run the binary:" msgstr "Agora você pode compilar, enviar e executar o binário:" #: src/android/build-rules/binary.md:29 -#, fuzzy msgid "" "```shell\n" "m hello_rust\n" @@ -15018,9 +15096,9 @@ msgid "" "```" msgstr "" "```shell\n" -"$ m hello_rust_logs\n" -"$ adb push $ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs /data/local/tmp\n" -"$ adb shell /data/local/tmp/hello_rust_logs\n" +"m hello_rust\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust /data/local/tmp\"\n" +"adb shell /data/local/tmp/hello_rust\n" "```" #: src/android/build-rules/binary.md:35 @@ -15029,6 +15107,9 @@ msgid "" "Hello from Rust!\n" "```" msgstr "" +"```text\n" +"Olá do Rust!\n" +"```" #: src/android/build-rules/library.md:1 msgid "# Rust Libraries" @@ -15050,11 +15131,10 @@ msgid "" " [`external/rust/crates/`][crates]." msgstr "" "* `libgreeting`, que definimos abaixo,\n" -"* `libtextwrap`, que é um `crate` já vendida em\n" +"* `libtextwrap`, que é um `crate` já oferecido em\n" " [`external/rust/crates/`][crates]." #: src/android/build-rules/library.md:15 -#, fuzzy msgid "" "```javascript\n" "rust_binary {\n" @@ -15085,10 +15165,16 @@ msgstr "" " \"libtextwrap\",\n" " ],\n" " prefer_rlib: true,\n" -"}" +"}\n" +"\n" +"rust_library {\n" +" name: \"libgreetings\",\n" +" crate_name: \"greetings\",\n" +" srcs: [\"src/lib.rs\"],\n" +"}\n" +"```" #: src/android/build-rules/library.md:36 -#, fuzzy msgid "" "```rust,ignore\n" "//! Rust demo.\n" @@ -15102,6 +15188,12 @@ msgid "" "}\n" "```" msgstr "" +"```rust,ignore\n" +"//! Rust demo.\n" +"\n" +"use greetings::greeting;\n" +"use textwrap::fill;\n" +"\n" "/// Imprime uma saudação na saída padrão.\n" "fn main() {\n" " println!(\"{}\", fill(&greeting(\"Bob\"), 24));\n" @@ -15113,7 +15205,6 @@ msgid "_hello_rust/src/lib.rs_:" msgstr "_hello_rust/src/lib.rs_:" #: src/android/build-rules/library.md:50 -#, fuzzy msgid "" "```rust,ignore\n" "//! Greeting library.\n" @@ -15124,9 +15215,12 @@ msgid "" "}\n" "```" msgstr "" +"```rust,ignore\n" +"//! Greeting library.\n" +"\n" "/// Saudação `nome`.\n" -"pub fn greeting(name: &str) -> String {\n" -" format!(\"Olá {name}, prazer em conhecê-lo!\")\n" +"pub fn greeting(nome: &str) -> String {\n" +" format!(\"Olá {nome}, prazer em conhecê-lo!\")\n" "}\n" "```" @@ -15135,7 +15229,6 @@ msgid "You build, push, and run the binary like before:" msgstr "Você constrói, envia e executa o binário como antes:" #: src/android/build-rules/library.md:61 -#, fuzzy msgid "" "```shell\n" "m hello_rust_with_dep\n" @@ -15145,11 +15238,10 @@ msgid "" "```" msgstr "" "```shell\n" -"$ m hello_rust_with_dep\n" -"$ adb push $ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep /data/local/" -"tmp\n" -"$ adb shell /data/local/tmp/hello_rust_with_dep\n" -"Olá Bob, prazer em conhecê-lo!\n" +"m hello_rust_with_dep\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_with_dep /data/local/" +"tmp\"\n" +"adb shell /data/local/tmp/hello_rust_with_dep\n" "```" #: src/android/build-rules/library.md:67 @@ -15159,6 +15251,9 @@ msgid "" "nice to meet you!\n" "```" msgstr "" +"```text\n" +"Olá Bob, prazer em conhecê-lo!\n" +"```" #: src/android/aidl.md:1 msgid "# AIDL" @@ -15197,7 +15292,6 @@ msgstr "" "*birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl*:" #: src/android/aidl/interface.md:7 -#, fuzzy msgid "" "```java\n" "package com.example.birthdayservice;\n" @@ -15209,6 +15303,9 @@ msgid "" "}\n" "```" msgstr "" +"```java\n" +"package com.example.birthdayservice;\n" +"\n" "/** Interface de serviço de aniversário. */\n" "interface IBirthdayService {\n" " /** Gera uma mensagem de feliz aniversário. */\n" @@ -15254,12 +15351,12 @@ msgid "" "vendor\n" "partition." msgstr "" -"Adicione `vendor_available: true` se seu arquivo AIDL for usado por um " +"Adicione `vendor_available: true` caso seu arquivo AIDL seja usado por um " "binário na partição _vendor_." #: src/android/aidl/implementation.md:1 msgid "# Service Implementation" -msgstr "# Implementação de serviço" +msgstr "# Implementação do Serviço" #: src/android/aidl/implementation.md:3 msgid "We can now implement the AIDL service:" @@ -15293,6 +15390,26 @@ msgid "" "}\n" "```" msgstr "" +"```rust,ignore\n" +"//! Implementation of the `IBirthdayService` AIDL interface.\n" +"use com_example_birthdayservice::aidl::com::example::birthdayservice::" +"IBirthdayService::IBirthdayService;\n" +"use com_example_birthdayservice::binder;\n" +"\n" +"/// A implementação de `IBirthdayService`.\n" +"pub struct BirthdayService;\n" +"\n" +"impl binder::Interface for BirthdayService {}\n" +"\n" +"impl IBirthdayService for BirthdayService {\n" +" fn wishHappyBirthday(&self, name: &str, years: i32) -> binder::" +"Result {\n" +" Ok(format!(\n" +" \"Feliz aniversário {name}, parabéns pelos seus {years} anos!\"\n" +" ))\n" +" }\n" +"}\n" +"```" #: src/android/aidl/implementation.md:26 src/android/aidl/server.md:28 #: src/android/aidl/client.md:37 @@ -15338,7 +15455,6 @@ msgid "*birthday_service/src/server.rs*:" msgstr "*birthday_service/src/server.rs*:" #: src/android/aidl/server.md:7 -#, fuzzy msgid "" "```rust,ignore\n" "//! Birthday service.\n" @@ -15363,7 +15479,16 @@ msgid "" "}\n" "```" msgstr "" -"/// Point de entrada para serviço de aniversário.\n" +"```rust,ignore\n" +"//! Birthday service.\n" +"use birthdayservice::BirthdayService;\n" +"use com_example_birthdayservice::aidl::com::example::birthdayservice::" +"IBirthdayService::BnBirthdayService;\n" +"use com_example_birthdayservice::binder;\n" +"\n" +"const SERVICE_IDENTIFIER: &str = \"birthdayservice\";\n" +"\n" +"/// Ponto de entrada para serviço de aniversário.\n" "fn main() {\n" " let birthday_service = BirthdayService;\n" " let birthday_service_binder = BnBirthdayService::new_binder(\n" @@ -15403,7 +15528,7 @@ msgstr "" " \"libbinder_rs\",\n" " \"libbirthdayservice\",\n" " ],\n" -" prefere_rlib: true,\n" +" prefer_rlib: true,\n" "}\n" "```" @@ -15413,10 +15538,9 @@ msgstr "# Implantar" #: src/android/aidl/deploy.md:3 msgid "We can now build, push, and start the service:" -msgstr "Agora podemos construir, enviar e iniciar o serviço:" +msgstr "Agora podemos compilar, enviar e iniciar o serviço:" #: src/android/aidl/deploy.md:5 -#, fuzzy msgid "" "```shell\n" "m birthday_server\n" @@ -15426,37 +15550,34 @@ msgid "" "```" msgstr "" "```shell\n" -"$ m birthday_server\n" -"$ adb push $ANDROID_PRODUCT_OUT/system/bin/birthday_server /data/local/tmp\n" -"$ adb shell /data/local/tmp/birthday_server\n" +"m birthday_server\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_server /data/local/" +"tmp\"\n" +"adb shell /data/local/tmp/birthday_server\n" "```" #: src/android/aidl/deploy.md:11 msgid "In another terminal, check that the service runs:" -msgstr "Em outro terminal, verifique se o serviço é executado:" +msgstr "Em outro terminal, verifique se o serviço está sendo executado:" #: src/android/aidl/deploy.md:13 -#, fuzzy msgid "" "```shell\n" "adb shell service check birthdayservice\n" "```" msgstr "" "```shell\n" -"$ adb shell service check birthdayservice\n" -"Serviço de aniversário: encontrado\n" +"adb shell service check birthdayservice\n" "```" #: src/android/aidl/deploy.md:17 -#, fuzzy msgid "" "```text\n" "Service birthdayservice: found\n" "```" msgstr "" -"```shell\n" -"$ adb shell service check birthdayservice\n" -"Serviço de aniversário: encontrado\n" +"```text\n" +"Service birthdayservice: found\n" "```" #: src/android/aidl/deploy.md:21 @@ -15464,19 +15585,16 @@ msgid "You can also call the service with `service call`:" msgstr "Você também pode chamar o serviço com `service call`:" #: src/android/aidl/deploy.md:23 -#, fuzzy msgid "" "```shell\n" "adb shell service call birthdayservice 1 s16 Bob i32 24\n" "```" msgstr "" "```shell\n" -"$ adb shell service check birthdayservice\n" -"Serviço de aniversário: encontrado\n" +"adb shell service call birthdayservice 1 s16 Bob i32 24\n" "```" #: src/android/aidl/deploy.md:27 -#, fuzzy msgid "" "```text\n" "Result: Parcel(\n" @@ -15490,17 +15608,16 @@ msgid "" " 0x00000070: 00210073 00000000 's.!..... ')\n" "```" msgstr "" -"```shell\n" -"$ $ adb shell service call birthdayservice 1 s16 Bob i32 24\n" +"```text\n" "Result: Parcel(\n" " 0x00000000: 00000000 00000036 00610048 00700070 '....6...H.a.p.p.'\n" " 0x00000010: 00200079 00690042 00740072 00640068 'y. .B.i.r.t.h.d.'\n" " 0x00000020: 00790061 00420020 0062006f 0020002c 'a.y. .B.o.b.,. .'\n" " 0x00000030: 006f0063 0067006e 00610072 00750074 'c.o.n.g.r.a.t.u.'\n" " 0x00000040: 0061006c 00690074 006e006f 00200073 'l.a.t.i.o.n.s. .'\n" -" 0x00000050: 00690077 00680074 00740020 00650068 'w.i.t.h. .a.'\n" +" 0x00000050: 00690077 00680074 00740020 00650068 'w.i.t.h. .t.h.e.'\n" " 0x00000060: 00320020 00200034 00650079 00720061 ' .2.4. .y.e.a.r.'\n" -" 0x00000070: 00210073 00000000 's.!..... ')\n" +" 0x00000070: 00210073 00000000 's.!..... ')\n" "```" #: src/android/aidl/client.md:1 @@ -15550,6 +15667,38 @@ msgid "" "}\n" "```" msgstr "" +"```rust,ignore\n" +"//! Birthday service.\n" +"use com_example_birthdayservice::aidl::com::example::birthdayservice::" +"IBirthdayService::IBirthdayService;\n" +"use com_example_birthdayservice::binder;\n" +"\n" +"const SERVICE_IDENTIFIER: &str = \"birthdayservice\";\n" +"\n" +"/// Connecta-se ao serviço de aniversário BirthdayService.\n" +"pub fn connect() -> Result, binder::" +"StatusCode> {\n" +" binder::get_interface(SERVICE_IDENTIFIER)\n" +"}\n" +"\n" +"/// Chama o serviço de aniversário.\n" +"fn main() -> Result<(), binder::Status> {\n" +" let name = std::env::args()\n" +" .nth(1)\n" +" .unwrap_or_else(|| String::from(\"Bob\"));\n" +" let years = std::env::args()\n" +" .nth(2)\n" +" .and_then(|arg| arg.parse::().ok())\n" +" .unwrap_or(42);\n" +"\n" +" binder::ProcessState::start_thread_pool();\n" +" let service = connect().expect(\"Falha ao conectar-se a " +"BirthdayService\");\n" +" let msg = service.wishHappyBirthday(&name, years)?;\n" +" println!(\"{msg}\");\n" +" Ok(())\n" +"}\n" +"```" #: src/android/aidl/client.md:39 msgid "" @@ -15585,10 +15734,9 @@ msgstr "Observe que o cliente não depende de `libbirthdayservice`." #: src/android/aidl/client.md:54 msgid "Build, push, and run the client on your device:" -msgstr "Crie, envie e execute o cliente em seu dispositivo:" +msgstr "Compile, envie e execute o cliente em seu dispositivo:" #: src/android/aidl/client.md:56 -#, fuzzy msgid "" "```shell\n" "m birthday_client\n" @@ -15598,9 +15746,10 @@ msgid "" "```" msgstr "" "```shell\n" -"$ m birthday_server\n" -"$ adb push $ANDROID_PRODUCT_OUT/system/bin/birthday_server /data/local/tmp\n" -"$ adb shell /data/local/tmp/birthday_server\n" +"m birthday_client\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/birthday_client /data/local/" +"tmp\"\n" +"adb shell /data/local/tmp/birthday_client Carlos 60\n" "```" #: src/android/aidl/client.md:62 @@ -15609,6 +15758,9 @@ msgid "" "Happy Birthday Charlie, congratulations with the 60 years!\n" "```" msgstr "" +"```text\n" +"Feliz aniversário Carlos, parabéns pelos seus 60 anos!\n" +"```" #: src/android/aidl/changing.md:1 msgid "# Changing API" @@ -15622,10 +15774,9 @@ msgid "" msgstr "" "Vamos estender a API com mais funcionalidades: queremos permitir que os " "clientes especifiquem uma\n" -"lista de linhas para o cartão de aniversário:" +"lista de frases para o cartão de aniversário:" #: src/android/aidl/changing.md:6 -#, fuzzy msgid "" "```java\n" "package com.example.birthdayservice;\n" @@ -15637,6 +15788,9 @@ msgid "" "}\n" "```" msgstr "" +"```java\n" +"package com.example.birthdayservice;\n" +"\n" "/** Interface de serviço de aniversário. */\n" "interface IBirthdayService {\n" " /** Gera uma mensagem de feliz aniversário. */\n" @@ -15646,7 +15800,7 @@ msgstr "" #: src/android/logging.md:1 src/bare-metal/aps/logging.md:1 msgid "# Logging" -msgstr "# Gerando registros (Log)" +msgstr "# Gerando Registros (_Log_)" #: src/android/logging.md:3 msgid "" @@ -15656,7 +15810,7 @@ msgid "" msgstr "" "Você deve usar o `crate` `log` para logar automaticamente no `logcat` (no " "dispositivo) ou\n" -"`stdout` (no hospedeiro):" +"`stdout` (no _host_):" #: src/android/logging.md:6 msgid "_hello_rust_logs/Android.bp_:" @@ -15687,7 +15841,7 @@ msgstr "" " \"liblog_rust\",\n" " \"liblogger\",\n" " ],\n" -" prefere_rlib: true,\n" +" prefer_rlib: true,\n" " host_supported: true,\n" "}\n" "```" @@ -15697,7 +15851,6 @@ msgid "_hello_rust_logs/src/main.rs_:" msgstr "_hello_rust_logs/src/main.rs_:" #: src/android/logging.md:24 -#, fuzzy msgid "" "```rust,ignore\n" "//! Rust logging demo.\n" @@ -15717,6 +15870,11 @@ msgid "" "}\n" "```" msgstr "" +"```rust,ignore\n" +"//! Rust logging demo.\n" +"\n" +"use log::{debug, error, info};\n" +"\n" "/// Registra uma saudação.\n" "fn main() {\n" " logger::init(\n" @@ -15733,10 +15891,9 @@ msgstr "" #: src/android/logging.md:42 src/android/interoperability/with-c/bindgen.md:98 #: src/android/interoperability/with-c/rust.md:73 msgid "Build, push, and run the binary on your device:" -msgstr "Crie, envie e execute o binário em seu dispositivo:" +msgstr "Compile, envie e execute o binário em seu dispositivo:" #: src/android/logging.md:44 -#, fuzzy msgid "" "```shell\n" "m hello_rust_logs\n" @@ -15746,9 +15903,10 @@ msgid "" "```" msgstr "" "```shell\n" -"$ m hello_rust_logs\n" -"$ adb push $ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs /data/local/tmp\n" -"$ adb shell /data/local/tmp/hello_rust_logs\n" +"m hello_rust_logs\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/hello_rust_logs /data/local/" +"tmp\"\n" +"adb shell /data/local/tmp/hello_rust_logs\n" "```" #: src/android/logging.md:50 @@ -15756,18 +15914,16 @@ msgid "The logs show up in `adb logcat`:" msgstr "Os logs aparecem em `adb logcat`:" #: src/android/logging.md:52 -#, fuzzy msgid "" "```shell\n" "adb logcat -s rust\n" "```" msgstr "" "```shell\n" -"$ cargo run\n" +"adb logcat -s rust\n" "```" #: src/android/logging.md:56 -#, fuzzy msgid "" "```text\n" "09-08 08:38:32.454 2420 2420 D rust: hello_rust_logs: Starting program.\n" @@ -15777,8 +15933,7 @@ msgid "" "wrong!\n" "```" msgstr "" -"```shell\n" -"$ adb logcat -s rust\n" +"```text\n" "09-08 08:38:32.454 2420 2420 D rust: hello_rust_logs: Iniciando o programa.\n" "09-08 08:38:32.454 2420 2420 I rust: hello_rust_logs: As coisas estão indo " "bem.\n" @@ -15795,7 +15950,7 @@ msgid "" "means\n" "that you can:" msgstr "" -"Rust tem excelente suporte para interoperabilidade com outras linguagens. " +"O Rust tem excelente suporte para interoperabilidade com outras linguagens. " "Isso significa\n" "que você pode:" @@ -15834,7 +15989,6 @@ msgid "You can do it by hand if you want:" msgstr "Você pode fazer isso manualmente se quiser:" #: src/android/interoperability/with-c.md:8 -#, fuzzy msgid "" "```rust\n" "extern \"C\" {\n" @@ -15848,6 +16002,11 @@ msgid "" "}\n" "```" msgstr "" +"```rust\n" +"extern \"C\" {\n" +" fn abs(x: i32) -> i32;\n" +"}\n" +"\n" "fn main() {\n" " let x = -42;\n" " let abs_x = unsafe { abs(x) };\n" @@ -15878,7 +16037,7 @@ msgstr "Veremos opções melhores a seguir." #: src/android/interoperability/with-c/bindgen.md:1 msgid "# Using Bindgen" -msgstr "# Usando Bingen" +msgstr "# Usando Bindgen" #: src/android/interoperability/with-c/bindgen.md:3 msgid "" @@ -15888,7 +16047,8 @@ msgid "" msgstr "" "A ferramenta [bindgen](https://rust-lang.github.io/rust-bindgen/introduction." "html)\n" -"pode gerar ligações automaticamente a partir de um arquivo de cabeçalho C." +"pode gerar vínculos (_bindings_) automaticamente a partir de um arquivo de " +"cabeçalho C." #: src/android/interoperability/with-c/bindgen.md:6 msgid "First create a small C library:" @@ -15899,7 +16059,6 @@ msgid "_interoperability/bindgen/libbirthday.h_:" msgstr "_interoperability/bindgen/libbirthday.h_:" #: src/android/interoperability/with-c/bindgen.md:10 -#, fuzzy msgid "" "```c\n" "typedef struct card {\n" @@ -15914,14 +16073,16 @@ msgstr "" "typedef struct card {\n" " const char* name;\n" " int years;\n" -"} card;" +"} card;\n" +"\n" +"void print_card(const card* card);\n" +"```" #: src/android/interoperability/with-c/bindgen.md:19 msgid "_interoperability/bindgen/libbirthday.c_:" msgstr "_interoperability/bindgen/libbirthday.c_:" #: src/android/interoperability/with-c/bindgen.md:21 -#, fuzzy msgid "" "```c\n" "#include \n" @@ -15935,10 +16096,14 @@ msgid "" "}\n" "```" msgstr "" +"```c\n" +"#include \n" +"#include \"libbirthday.h\"\n" +"\n" "void print_card(const card* card) {\n" " printf(\"+--------------\\n\");\n" -" printf(\"| Feliz Aniversário %s!\\n\", card->name);\n" -" printf(\"| Parabéns pelos %i anos!\\n\", card->years);\n" +" printf(\"|Feliz Aniversário %s!\\n\", card->nome);\n" +" printf(\"|Parabéns pelos %i anos!\\n\", card->anos);\n" " printf(\"+--------------\\n\");\n" "}\n" "```" @@ -15975,7 +16140,7 @@ msgid "" "Create a wrapper header file for the library (not strictly needed in this\n" "example):" msgstr "" -"Crie um arquivo de cabeçalho wrapper para a biblioteca (não estritamente " +"Crie um arquivo de cabeçalho _wrapper_ para a biblioteca (não estritamente " "necessário neste\n" "exemplo):" @@ -15995,7 +16160,7 @@ msgstr "" #: src/android/interoperability/with-c/bindgen.md:53 msgid "You can now auto-generate the bindings:" -msgstr "Agora você pode gerar automaticamente as vinculações:" +msgstr "Agora você pode gerar automaticamente as vinculações (_binding_):" #: src/android/interoperability/with-c/bindgen.md:57 msgid "" @@ -16021,7 +16186,8 @@ msgstr "" #: src/android/interoperability/with-c/bindgen.md:67 msgid "Finally, we can use the bindings in our Rust program:" -msgstr "Finalmente, podemos usar as ligações em nosso programa Rust:" +msgstr "" +"Finalmente, podemos usar as vinculações (_bindings_) em nosso programa Rust:" #: src/android/interoperability/with-c/bindgen.md:71 msgid "" @@ -16046,7 +16212,6 @@ msgid "_interoperability/bindgen/main.rs_:" msgstr "_interoperability/bindgen/main.rs_:" #: src/android/interoperability/with-c/bindgen.md:81 -#, fuzzy msgid "" "```rust,compile_fail\n" "//! Bindgen demo.\n" @@ -16065,8 +16230,13 @@ msgid "" "}\n" "```" msgstr "" +"```rust,compile_fail\n" +"//! Bindgen demo.\n" +"\n" +"use birthday_bindgen::{card, print_card};\n" +"\n" "fn main() {\n" -" let name = std::ffi::CString::new(\"Peter\").unwrap();\n" +" let name = std::ffi::CString::new(\"Pedro\").unwrap();\n" " let card = card {\n" " name: name.as_ptr(),\n" " years: 42,\n" @@ -16078,7 +16248,6 @@ msgstr "" "```" #: src/android/interoperability/with-c/bindgen.md:100 -#, fuzzy msgid "" "```shell\n" "m print_birthday_card\n" @@ -16088,10 +16257,10 @@ msgid "" "```" msgstr "" "```shell\n" -"$ m print_birthday_card\n" -"$ adb push $ANDROID_PRODUCT_OUT/system/bin/print_birthday_card /data/local/" -"tmp\n" -"$ adb shell /data/local/tmp/print_birthday_card\n" +"m print_birthday_card\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/print_birthday_card /data/local/" +"tmp\"\n" +"adb shell /data/local/tmp/print_birthday_card\n" "```" #: src/android/interoperability/with-c/bindgen.md:106 @@ -16127,14 +16296,13 @@ msgstr "" "```" #: src/android/interoperability/with-c/bindgen.md:122 -#, fuzzy msgid "" "```shell\n" "atest libbirthday_bindgen_test\n" "```" msgstr "" "```shell\n" -"$ atest libbirthday_bindgen_test\n" +"atest libbirthday_bindgen_test\n" "```" #: src/android/interoperability/with-c/rust.md:1 @@ -16150,7 +16318,6 @@ msgid "_interoperability/rust/libanalyze/analyze.rs_" msgstr "_interoperability/rust/libanalyze/analyze.rs_" #: src/android/interoperability/with-c/rust.md:7 -#, fuzzy msgid "" "```rust,editable\n" "//! Rust FFI demo.\n" @@ -16169,6 +16336,12 @@ msgid "" "}\n" "```" msgstr "" +"```rust,editable\n" +"//! Rust FFI demo.\n" +"#![deny(improper_ctypes_definitions)]\n" +"\n" +"use std::os::raw::c_int;\n" +"\n" "/// Analisar os números.\n" "#[no_mangle]\n" "pub extern \"C\" fn analyze_numbers(x: c_int, y: c_int) {\n" @@ -16185,7 +16358,6 @@ msgid "_interoperability/rust/libanalyze/analyze.h_" msgstr "_interoperability/rust/libanalyze/analyze.h_" #: src/android/interoperability/with-c/rust.md:26 -#, fuzzy msgid "" "```c\n" "#ifndef ANALYSE_H\n" @@ -16198,9 +16370,16 @@ msgid "" "#endif\n" "```" msgstr "" +"```c\n" +"#ifndef ANALYSE_H\n" +"#define ANALYSE_H\n" +"\n" "extern \"C\" {\n" "void analyze_numbers(int x, int y);\n" -"}" +"}\n" +"\n" +"#endif\n" +"```" #: src/android/interoperability/with-c/rust.md:37 msgid "_interoperability/rust/libanalyze/Android.bp_" @@ -16228,14 +16407,13 @@ msgstr "" #: src/android/interoperability/with-c/rust.md:48 msgid "We can now call this from a C binary:" -msgstr "Agora podemos chamar isso de um binário C:" +msgstr "Agora podemos chamá-lo a partir de um binário C:" #: src/android/interoperability/with-c/rust.md:50 msgid "_interoperability/rust/analyze/main.c_" msgstr "_interoperability/rust/analisar/main.c_" #: src/android/interoperability/with-c/rust.md:52 -#, fuzzy msgid "" "```c\n" "#include \"analyze.h\"\n" @@ -16247,6 +16425,9 @@ msgid "" "}\n" "```" msgstr "" +"```c\n" +"#include \"analyze.h\"\n" +"\n" "int main() {\n" " analyze_numbers(10, 20);\n" " analyze_numbers(123, 123);\n" @@ -16277,7 +16458,6 @@ msgstr "" "```" #: src/android/interoperability/with-c/rust.md:75 -#, fuzzy msgid "" "```shell\n" "m analyze_numbers\n" @@ -16287,9 +16467,10 @@ msgid "" "```" msgstr "" "```shell\n" -"$ m analyze_numbers\n" -"$ adb push $ANDROID_PRODUCT_OUT/system/bin/analyze_numbers /data/local/tmp\n" -"$ adb shell /data/local/tmp/analyze_numbers\n" +"m analyze_numbers\n" +"adb push \"$ANDROID_PRODUCT_OUT/system/bin/analyze_numbers /data/local/" +"tmp\"\n" +"adb shell /data/local/tmp/analyze_numbers\n" "```" #: src/android/interoperability/with-c/rust.md:83 @@ -16353,7 +16534,6 @@ msgid "_interoperability/java/src/lib.rs_:" msgstr "_interoperability/java/src/lib.rs_:" #: src/android/interoperability/java.md:11 -#, fuzzy msgid "" "```rust,compile_fail\n" "//! Rust <-> Java FFI demo.\n" @@ -16376,6 +16556,13 @@ msgid "" "}\n" "```" msgstr "" +"```rust,compile_fail\n" +"//! Rust <-> Java FFI demo.\n" +"\n" +"use jni::objects::{JClass, JString};\n" +"use jni::sys::jstring;\n" +"use jni::JNIEnv;\n" +"\n" "/// Implementação do método HelloWorld::hello.\n" "#[no_mangle]\n" "pub extern \"system\" fn Java_HelloWorld_hello(\n" @@ -16424,7 +16611,6 @@ msgid "_interoperability/java/HelloWorld.java_:" msgstr "_interoperability/java/HelloWorld.java_:" #: src/android/interoperability/java.md:47 -#, fuzzy msgid "" "```java\n" "class HelloWorld {\n" @@ -16441,6 +16627,14 @@ msgid "" "}\n" "```" msgstr "" +"```java\n" +"class HelloWorld {\n" +" private static native String hello(String name);\n" +"\n" +" static {\n" +" System.loadLibrary(\"hello_jni\");\n" +" }\n" +"\n" " public static void main(String[] args) {\n" " String output = HelloWorld.hello(\"Alice\");\n" " System.out.println(output);\n" @@ -16473,7 +16667,6 @@ msgid "Finally, you can build, sync, and run the binary:" msgstr "Por fim, você pode criar, sincronizar e executar o binário:" #: src/android/interoperability/java.md:75 -#, fuzzy msgid "" "```shell\n" "m helloworld_jni\n" @@ -16482,9 +16675,9 @@ msgid "" "```" msgstr "" "```shell\n" -"$ m helloworld_jni\n" -"$ adb sync # requer adb root && adb remount\n" -"$ adb shell /system/bin/helloworld_jni\n" +"m helloworld_jni\n" +"adb sync # requer adb root && adb remount\n" +"adb shell /system/bin/helloworld_jni\n" "```" #: src/exercises/android/morning.md:1 src/exercises/bare-metal/morning.md:1 @@ -16495,23 +16688,24 @@ msgid "# Exercises" msgstr "# Exercícios" #: src/exercises/android/morning.md:3 -#, fuzzy msgid "" "This is a group exercise: We will look at one of the projects you work with " "and\n" "try to integrate some Rust into it. Some suggestions:" msgstr "" -"No último exercício, veremos um dos projetos com os quais você trabalha. " -"Chamem-nos\n" -"agrupem-se e façam isso juntos. Algumas sugestões:" +"Este é um exercício em grupo: Nós iremos ver um dos projetos com os quais " +"você trabalha e\n" +"tentar integrar um pouco de Rust nele. Algumas sugestões:" #: src/exercises/android/morning.md:6 -#, fuzzy msgid "" "* Call your AIDL service with a client written in Rust.\n" "\n" "* Move a function from your project to Rust and call it." -msgstr "* Mova uma função do seu projeto para o Rust e chame-a." +msgstr "" +"* Chame seu serviço AIDL com um cliente escrito em Rust.\n" +"\n" +"* Mova uma função do seu projeto para o Rust e a chame." #: src/exercises/android/morning.md:12 msgid "" @@ -16524,9 +16718,8 @@ msgstr "" "tempo real." #: src/bare-metal.md:1 -#, fuzzy msgid "# Welcome to Bare Metal Rust" -msgstr "# Bem-vindo ao Comprehensive Rust 🦀" +msgstr "# Bem-vindo ao Rust _Bare Metal_ 🦀" #: src/bare-metal.md:3 msgid "" @@ -25287,6 +25480,42 @@ msgid "" "```" msgstr "" +#~ msgid "> TL;DR: Visit [rustup.rs][1]." +#~ msgstr "> TL;DR: Veja [rustup.rs][1]." + +#~ msgid "" +#~ "You can follow the instructions to install cargo and rust compiler, among " +#~ "other standard ecosystem tools with the [rustup][1] tool, which is " +#~ "maintained by the Rust Foundation." +#~ msgstr "" +#~ "Você pode seguir as instruções para instalar o cargo e o compilador do " +#~ "Rust, entre outras ferramentas padrão do ecossistema, com a ferramenta " +#~ "[rustup][1], que é mantida pela Rust Foundation." + +#~ msgid "The module content can be omitted:" +#~ msgstr "O conteúdo do módulo pode ser omitido:" + +#~ msgid "The `garden` module content is found at:" +#~ msgstr "O conteúdo do módulo `jardim` é encontrado em:" + +#~ msgid "" +#~ "* `src/garden.rs` (modern Rust 2018 style)\n" +#~ "* `src/garden/mod.rs` (older Rust 2015 style)" +#~ msgstr "" +#~ "* `src/jardim.rs` (estilo Rust 2018 moderno)\n" +#~ "* `src/jardim/mod.rs` (antigo estilo Rust 2015)" + +#~ msgid "Similarly, a `garden::vegetables` module can be found at:" +#~ msgstr "" +#~ "Da mesma forma, um módulo `jardim::vegetais` pode ser encontrado em:" + +#~ msgid "" +#~ "* `src/garden/vegetables.rs` (modern Rust 2018 style)\n" +#~ "* `src/garden/vegetables/mod.rs` (older Rust 2015 style)" +#~ msgstr "" +#~ "* `src/jardim/vegetais.rs` (estilo Rust 2018 moderno)\n" +#~ "* `src/jardim/vegetais/mod.rs` (antigo estilo Rust 2015)" + #~ msgid "### Rustup (Recommended)" #~ msgstr "### Rustup (Recomendado)"