comprehensive-rust
comprehensive-rust copied to clipboard
Page do not translate even having the translation
Hello,
I was reading about the first module in portuguese and does have a little problem maybe this can affect in other things too, the thing is that exists the translation for this text but the website do not translates...
https://google.github.io/comprehensive-rust/pt-BR/hello-world.html
Hello Gabriel!
thank you for reporting this issues. I had a look at the link and I'm not sure what is missing. The linked page is a page that introduces the segment and is not supposed to have more content on it beside the listing how long each of the three slides should take. The other three slides in that segment have translated content as far as I see.
Can you show what content exactly you are missing in the translation?
Hello Michael,
The issue is related to the following text quoted below:
"This segment should take about 15 minutes. It contains:"
But this text and other texts involving pages of introduction to segments, they do not translate. When I checked out this text, it was translated in the code, but in a weirdly way the text continues in English...
As I can see some of text are not covered in the code, and I can help with the translation, not now but later...
These en sentences are generated and do not appear in the source markdown, but I do see them translated in the .po files. I wonder if there is an ordering issue with the markdown pre-processors which causes these to be added after translation?
Would this help?
diff --git book.toml book.toml
index aa678207..f284c33e 100644
--- book.toml
+++ book.toml
@@ -6,17 +6,17 @@ title = "Comprehensive Rust 🦀"
[rust]
edition = "2024"
[build]
extra-watch-dirs = ["po", "third_party"]
[preprocessor.gettext]
-after = ["links"]
+after = ["links", "course"]
[preprocessor.svgbob]
renderers = ["html"]
after = ["gettext"]
class = "bob"
[preprocessor.course]
verbose = false # Report timing information.
I saw in other tanslations such as spanish that they are not auto generated, they can be translated and they are translated in the pt-BR.po file.
The translation is on the line 2764 on pt-BR.po file, In portuguese the text is correct and is not translating...
#: src/hello-world.md src/concurrency/send-sync.md
msgid "This segment should take about 15 minutes"
msgstr "Este segmento deve durar cerca de 15 minutos"
In spanish is translated like this, and I think is because of the last It contains that do not translate
#: src/hello-world.md src/concurrency/send-sync.md
msgid "This segment should take about 15 minutes. It contains:"
msgstr "Esta sección tiene una duración aproximada de 15 minutos y contiene:"
I will correct this and open a pull request for correcting this little mistake...