comprehensive-rust icon indicating copy to clipboard operation
comprehensive-rust copied to clipboard

Brazilian Portuguese translation

Open mgeisler opened this issue 2 years ago • 17 comments

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 avatar Feb 01 '23 10:02 mgeisler

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.

mgeisler avatar Feb 02 '23 15:02 mgeisler

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

rastringer avatar Feb 02 '23 17:02 rastringer

#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 avatar Feb 04 '23 09:02 mgeisler

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

mgeisler avatar Feb 16 '23 10:02 mgeisler

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.

mgeisler avatar Aug 25 '23 09:08 mgeisler

Thanks @mgeisler, PR submitted

rastringer avatar Aug 25 '23 11:08 rastringer

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.

mgeisler avatar Aug 25 '23 12:08 mgeisler

I'm working to clean up the fuzzy entries.

henrif75 avatar Aug 25 '23 18:08 henrif75

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: @.***>

rastringer avatar Aug 25 '23 19:08 rastringer

I'll do it in another PR, thanks!

henrif75 avatar Aug 28 '23 05:08 henrif75

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.

mgeisler avatar Nov 09 '23 14:11 mgeisler

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 avatar Nov 09 '23 18:11 henrif75

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

henrif75 avatar Nov 09 '23 18:11 henrif75

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!

mgeisler avatar Nov 10 '23 14:11 mgeisler

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

jcvicelli avatar Jan 31 '24 15:01 jcvicelli

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

Thank you, @jcvicelli !

henrif75 avatar Jan 31 '24 18:01 henrif75

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

azevedoalice avatar Feb 01 '24 11:02 azevedoalice