1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-16 22:27:34 +02:00

Skip some untranslatable code blocks (#1258)

This builds on the work of @dyoo in
https://github.com/google/mdbook-i18n-helpers/pull/69: by adding a
special `<!-- mdbook-xgettext: skip -->` comment, we can skip the
following code block.

I also modified a few code blocks to remove translatable text: variable
names are not expected to be translated, so it’s fine to have a line
with `println!("foo: {foo}")` in the code block.

This PR removes 36 messages from the POT file. The number of lines drop
by 633 (3%).

Part of #1257.
This commit is contained in:
Martin Geisler
2023-09-26 17:04:46 +02:00
committed by GitHub
parent a492b2f1b2
commit d0e0e5c1af
27 changed files with 49 additions and 14 deletions

View File

@ -24,6 +24,7 @@ void say_hello(std::unique_ptr<Person> person) {
Special move constructors are used when passing ownership to a function:
<!-- mdbook-xgettext: skip -->
```c++
std::unique_ptr<Person> person = find_person("Carla");
say_hello(std::move(person));