google / comprehensive-rust

This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust.
https://google.github.io/comprehensive-rust/
Apache License 2.0
27.44k stars 1.63k forks source link

Brazilian Portuguese translation #317

Open mgeisler opened 1 year ago

mgeisler commented 1 year ago

I've created Google Cloud Translate file to get started: pt_BR.zip.

We might have to update our publishing machinery to handle the xx_YY form of the locale, but we'll deal with this when we get there :-)

mgeisler commented 1 year ago

The Rust book is translated here, I hope it can be a good source of inspiration: https://github.com/rust-br/rust-book-pt-br.

rastringer commented 1 year ago

Brilliant, thanks for this it's just what I needed to check some of the vocab. About 15% done.

mgeisler commented 1 year ago

340 translated the first part of the course — I'll reopen this issue so we can track the translation of the full course. After the first pass, there will be some ongoing work to keep the translation up to date. I don't think we need an issue to track that, we just need PRs once in a while

mgeisler commented 1 year ago

The translation is now published on https://google.github.io/comprehensive-rust/pt-BR/! Thanks a lot for the hard work here!

mgeisler commented 1 year ago

Hi @rastringer, @hugojacob, @joaovicmendes, @henrif75!

It would be great if you could refresh the translation with msgmerge after installing the new version of mdbook-i18n-helpers. After the normalization in #1104, you need a refresh to get new strings incorporated and to mark old strings as obsolete.

rastringer commented 1 year ago

Thanks @mgeisler, PR submitted

mgeisler commented 1 year ago

Thanks @mgeisler, PR submitted

Thanks, looks good! You can decide if you want to take out unnecessary fuzzy entries in the PR directly or in a follow-up.

henrif75 commented 1 year ago

I'm working to clean up the fuzzy entries.

rastringer commented 1 year ago

Thanks Henri! Would it help to merge this initial PR or would you like to do it all at once?

On Fri, Aug 25, 2023, 19:48 Henri Fontana @.***> wrote:

I'm working to clean up the fuzzy entries.

— Reply to this email directly, view it on GitHub https://github.com/google/comprehensive-rust/issues/317#issuecomment-1693792608, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXU3L2LWGXXV4MR5WYQT2TXXDXPTANCNFSM6AAAAAAUNQX26U . You are receiving this because you were mentioned.Message ID: @.***>

henrif75 commented 1 year ago

I'll do it in another PR, thanks!

mgeisler commented 10 months ago

Hi all! I wanted to let you know about #1460. This is an update to mdbook-i18n-helpers which will remove ~6k lines from your PO file. It changes the way code blocks are processed: we now extract strings and comments directly.

You need to run mdbook-i18n-normalize on your PO file to preserve the translations found here: https://google.github.io/comprehensive-rust/pt-BR/hello-world/small-example.html (and any other places where you have translated comments).

You can do this before/after refreshing the translation. See #1461 for an example PR which shows the state after normalization.

henrif75 commented 10 months ago

Hi all! I wanted to let you know about #1460. This is an update to mdbook-i18n-helpers which will remove ~6k lines from your PO file. It changes the way code blocks are processed: we now extract strings and comments directly.

You need to run mdbook-i18n-normalize on your PO file to preserve the translations found here: https://google.github.io/comprehensive-rust/pt-BR/hello-world/small-example.html (and any other places where you have translated comments).

You can do this before/after refreshing the translation. See #1461 for an example PR which shows the state after normalization.

I'l send a PR soon.

henrif75 commented 10 months ago

Hi all! I wanted to let you know about #1460. This is an update to mdbook-i18n-helpers which will remove ~6k lines from your PO file. It changes the way code blocks are processed: we now extract strings and comments directly.

You need to run mdbook-i18n-normalize on your PO file to preserve the translations found here: https://google.github.io/comprehensive-rust/pt-BR/hello-world/small-example.html (and any other places where you have translated comments).

You can do this before/after refreshing the translation. See #1461 for an example PR which shows the state after normalization.

It's creating a huge diff mostly because it's adding a line break to the headers, is that supposed to happen?

- #: src/SUMMARY.md:25 src/why-rust/runtime.md:1
+ #: src/SUMMARY.md:25
+ #: src/why-rust/runtime.md:1
mgeisler commented 10 months ago

It's creating a huge diff mostly because it's adding a line break to the headers, is that supposed to happen?

- #: src/SUMMARY.md:25 src/why-rust/runtime.md:1
+ #: src/SUMMARY.md:25
+ #: src/why-rust/runtime.md:1

It's a small bug in the normalization tool: it doesn't wrap the lines the same way as msgmerge. I fixed it for mdbook-xgettext (https://github.com/google/mdbook-i18n-helpers/pull/93) but I forgot about mdbook-i18n-normalize.

You can fix it locally with

msgcat -o po/pt-BR.po po/pt-BR.po

Basically, the cat tool works as a formatting tool when you run a single file through it. It's also what we use in dprint, so dprint fmt should actually also fix it!

jcvicelli commented 7 months ago

Oi pessoal, just learning Rust here, so happy to help reviewing and translating to pt_br!

henrif75 commented 7 months ago

Oi pessoal, just learning Rust here, so happy to help reviewing and translating to pt_br!

Thank you, @jcvicelli !

azevedoalice commented 7 months ago

Hey everyone, I'm excited to learn rust and help translating to Brazilian Portuguese!