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
28.01k stars 1.67k forks source link

uk: Refresh translations #2375

Closed reta closed 2 months ago

reta commented 2 months ago

uk: Refresh translations

mdbook build
msgmerge --update po/uk.po book/xgettext/messages.pot
reta commented 2 months ago

Thanks @dyeroshenko , I think the msgid check is expected to fail since it is merge with recent content. Thanks again!

mgeisler commented 2 months ago

Yeah, thanks so much for these updates!

I think the msgid check is expected to fail since it is merge with recent content. Thanks again!

Actually, the check is based on the POT-Creation-Date header: if this field is unchanged, then the msgid fields must all be unchanged too. The goal was to avoid having people edit the auto-generated msgid fields (since doing so would have no effect). The test is green now, so I think this was done correctly.

Running dprint fmt on my system fixes the formatting complains from the other CI check. It also produces changes in pl.po and de.po, which is weird... that is #2173, which I still don't know what to do about.

One small thing you can do at some point would be update version of mdbook-i18n-helpers used. I think you're using an old version since I see line numbers for the files outside of SUMMARY.md:

-#: src/SUMMARY.md
-msgid "Slices: `&[T]`"
-msgstr "Зрізи: `&[T]`"
+#: src/SUMMARY.md src/references/slices.md:5
+msgid "Slices"
+msgstr "Зрізи"

The granularity setting in book.toml ought to prevent this:

https://github.com/google/comprehensive-rust/blob/2713ea34757990f48c521c50ab471a836683c91f/book.toml#L25-L28

If not, then something is broken somewhere :smile:

reta commented 2 months ago

Actually, the check is based on the POT-Creation-Date header: if this field is unchanged, then the msgid fields must all be unchanged too.

Thanks @mgeisler this field is actually changed:

- "POT-Creation-Date: 2024-06-27T18:39:25-04:00\n"
+ "POT-Creation-Date: 2024-09-21T12:49:47-04:00\n"
mgeisler commented 2 months ago

Actually, the check is based on the POT-Creation-Date header: if this field is unchanged, then the msgid fields must all be unchanged too.

Thanks @mgeisler this field is actually changed:

- "POT-Creation-Date: 2024-06-27T18:39:25-04:00\n"
+ "POT-Creation-Date: 2024-09-21T12:49:47-04:00\n"

Yeah, that must be why the "Prevent unintended msgid changes / check-msgid-changes" check passes. The "Test / format" should be gone now that @djmitche created #2381 — so this is ready to merge.