1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-02-09 20:23:37 +02:00

Run mdbook test on translated code (#1961)

I made a small mistake during the refactor in #1492: I removed the
`MDBOOK_BOOK__LANGUAGE` environment variable, which means that we ended
up testing the original Rust code snippets again and again.

This commit also fixes the few typos that have sneaked into the
translations due to the lack of testing.
This commit is contained in:
Martin Geisler 2024-04-07 12:38:18 +02:00 committed by GitHub
parent 059c7129d1
commit 620b8a3b72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 22 additions and 20 deletions

View File

@ -159,4 +159,6 @@ jobs:
path: book/
- name: Test code snippets
env:
MDBOOK_BOOK__LANGUAGE: ${{ matrix.language }}
run: mdbook test

View File

@ -4403,7 +4403,7 @@ msgstr "\"Dame información sobre {triple:?}\""
#: src/tuples-and-arrays/destructuring.md
msgid "\"First is 0, y = {y}, and z = {z}\""
msgstr "\"El primero es 0, y = {y}, z = {z}\"."
msgstr "\"El primero es 0, y = {y}, z = {z}\""
#: src/tuples-and-arrays/destructuring.md
msgid "\"First is 1 and the rest were ignored\""
@ -7235,7 +7235,7 @@ msgstr "\"Los miserables\""
#: src/std-types/hashmap.md
msgid "\"We know about {} books, but not Les Misérables.\""
msgstr ""
"\"Tenemos información acerca de {} libros, pero no de Los miserables\"."
"\"Tenemos información acerca de {} libros, pero no de Los miserables.\""
#: src/std-types/hashmap.md
msgid "\"Alice's Adventure in Wonderland\""
@ -9586,7 +9586,7 @@ msgid ""
"doctor\""
msgstr ""
"\"Actualiza las estadísticas de un usuario en función de las mediciones "
"obtenidas durante una consulta médica\"."
"obtenidas durante una consulta médica\""
#: src/borrowing/exercise.md src/borrowing/solution.md
#: src/android/build-rules/library.md src/android/aidl/client.md
@ -10013,7 +10013,7 @@ msgstr "\"¡Adiós, {text}!\""
msgid "\"The quick brown fox jumps over the lazy dog.\""
msgstr ""
"\"El veloz murciélago hindú comía feliz cardillo y kiwi. La cigüeña tocaba "
"el saxofón detrás del palenque de paja.\"."
"el saxofón detrás del palenque de paja.\""
#: src/slices-and-lifetimes/struct-lifetimes.md
msgid "// erase(text);\n"
@ -14019,7 +14019,7 @@ msgstr "/// Analiza los números.\n"
#: src/android/interoperability/with-c/rust.md
msgid "\"x ({x}) is smallest!\""
msgstr "¡\"x ({x}) es el menor!\""
msgstr "\"¡x ({x}) es el menor!\""
#: src/android/interoperability/with-c/rust.md
msgid "\"y ({y}) is probably larger than x ({x})\""

View File

@ -3275,7 +3275,7 @@ msgstr "`&str` - 읽기 전용 문자열입니다. 문자열 리터럴은 이
#: src/types-and-values/strings.md
msgid "\"Greetings\""
msgstr "\"인사말\""
msgstr "\" 인사말\""
#: src/types-and-values/strings.md
msgid "\"🪐\""
@ -3622,7 +3622,7 @@ msgstr ""
#: src/android/interoperability/cpp/rust-bridge.md
#: src/async/pitfalls/cancellation.md
msgid "\"{}\""
msgstr "'{}'"
msgstr "\"{}\""
#: src/control-flow-basics/break-continue/labels.md
msgid ""
@ -5537,7 +5537,7 @@ msgstr "\"16진수가 아님\""
#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md
msgid "\"result: {:?}\""
msgstr "'결과: {:?}'"
msgstr "\"결과: {:?}\""
#: src/pattern-matching/let-control-flow.md src/generics/trait-bounds.md
#: src/smart-pointers/solution.md src/testing/solution.md
@ -6017,7 +6017,7 @@ msgstr "// Clone 트레잇은 `clone` 메서드를 추가합니다.\n"
#: src/methods-and-traits/deriving.md
msgid "\"EldurScrollz\""
msgstr "'EldurScrollz'"
msgstr "\"EldurScrollz\""
#: src/methods-and-traits/deriving.md
msgid "// Debug trait adds support for printing with `{:?}`.\n"
@ -7713,7 +7713,7 @@ msgstr ""
#: src/std-traits/closures.md src/smart-pointers/trait-objects.md
msgid "\"{} {}\""
msgstr "'{} {}'"
msgstr "\"{} {}\""
#: src/std-traits/closures.md
msgid "\"Hi\""

View File

@ -5185,7 +5185,7 @@ msgstr "/// Um botão de andar foi pressionado no elevador.\n"
#: src/user-defined-types/exercise.md src/user-defined-types/solution.md
msgid "\"A ground floor passenger has pressed the up button: {:?}\""
msgstr "Um passageiro do térreo pressionou o botão para subir: {:?}"
msgstr "\"Um passageiro do térreo pressionou o botão para subir: {:?}\""
#: src/user-defined-types/exercise.md src/user-defined-types/solution.md
msgid "\"The car has arrived on the ground floor: {:?}\""
@ -5474,7 +5474,7 @@ msgstr ""
#: src/pattern-matching/let-control-flow.md
msgid "\"slept for {:?}\""
msgstr "\"dormiu por {s:?}\""
msgstr "\"dormiu por {:?}\""
#: src/pattern-matching/let-control-flow.md
msgid "`let else` expressions"
@ -7784,7 +7784,7 @@ msgstr ""
#: src/std-traits/closures.md
msgid "\"Calling function on {input}\""
msgstr "\"Chamando a função com {entrada}\""
msgstr "\"Chamando a função com {input}\""
#: src/std-traits/closures.md
msgid "\"add_3: {}\""

View File

@ -4521,7 +4521,7 @@ msgstr ""
#: src/user-defined-types/static-and-const.md
msgid "\"Welcome to RustOS 3.14\""
msgstr "RustOS 3.14'e Hoş Geldiniz"
msgstr "\"RustOS 3.14'e Hoş Geldiniz\""
#: src/user-defined-types/static-and-const.md
msgid "\"{BANNER}\""

View File

@ -3101,7 +3101,7 @@ msgstr ""
#: src/types-and-values/strings.md
msgid "\"Greetings\""
msgstr "\"Привітання\""
msgstr "\" Привітання\""
#: src/types-and-values/strings.md
msgid "\"🪐\""
@ -4135,7 +4135,7 @@ msgstr "'d'"
#: src/tuples-and-arrays/match.md
msgid "\"Moving around\""
msgstr "Пересування"
msgstr "\"Пересування\""
#: src/tuples-and-arrays/match.md src/error-handling/exercise.md
#: src/error-handling/solution.md
@ -5172,7 +5172,7 @@ msgstr "\"Двері у кабіні ліфта зачинилися: {:?}\""
#: src/user-defined-types/exercise.md src/user-defined-types/solution.md
msgid "\"The car has arrived on the 3rd floor: {:?}\""
msgstr "\"Кабіна ліфта заїхала на 3-й поверх: {:?}\"і"
msgstr "\"Кабіна ліфта заїхала на 3-й поверх: {:?}\""
#: src/user-defined-types/solution.md
msgid "/// A button was pressed.\n"
@ -5465,7 +5465,7 @@ msgstr "\"отримав порожній рядок\""
#: src/pattern-matching/let-control-flow.md
msgid "\"not a hex digit\""
msgstr "не шістнадцяткова цифра"
msgstr "\"не шістнадцяткова цифра\""
#: src/pattern-matching/let-control-flow.md src/pattern-matching/solution.md
msgid "\"result: {:?}\""
@ -8038,7 +8038,7 @@ msgstr "Присвоєння переміщує _володіння_ між зм
#: src/memory-management/move.md
msgid "\"Hello!\""
msgstr "Привіт!"
msgstr "\"Привіт!\""
#: src/memory-management/move.md src/slices-and-lifetimes/str.md
msgid "\"s2: {s2}\""
@ -12529,7 +12529,7 @@ msgstr ""
#: src/unsafe-rust/solution.md
msgid "// SAFETY: self.dir is not NULL.\n"
msgstr "БЕЗПЕКА: self.dir не є NULL.\n"
msgstr "// БЕЗПЕКА: self.dir не є NULL.\n"
#: src/unsafe-rust/solution.md
msgid "\"Could not close {:?}\""