-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uk: avoid translating fixed strings in protobufs #2507
Conversation
The protobuf exercise asks people to decode a few fixed byte slices: https://google.github.io/comprehensive-rust/uk/lifetimes/exercise.html Some of the messages in the slices are fixed English strings, such as “home”. They should thus not be translated into other languages. This should fix the CI. I guess it wasn’t caught before merging because of a parallel update.
Made obsolete by #2506. @reta, in case you weren't aware, the best way to indicate that a string should remain untranslated is to copy the |
Thanks @mgeisler , yes I am aware of that but it makes a bit difficult to track new messages that require translation (they are always having empty |
Okay, though I don't understand how it makes difficult to track new messages? You will have msgid "untranslated"
msgstr ""
msgid "no-op translation"
msgstr "no-op translation" in the If a no-op translation changes, you end up with something like #, fuzzy
msgid "changed no-op translation"
msgstr "no-op translation" The fuzzy entry will be ignored when building the book, thus resulting in "changed no-op translation" showing up, which is what you'll want. |
Thanks @mgeisler , this is correct, I have difficulties to track this case:
May be this is a flaw in my workflow only, but thanks a lot for sharing your thoughts over it. |
@mgeisler my sincere apologies, I completely misread your initial suggestion, this is exactly the way we (I) should be doing it, sorry about that. Please disregard my previous comment. |
No worries at all! 😄 Since all this is not very obvious to anybody, I guess we should add a line or two about it to the TRANSLATING documentation. Ideally, we should not put these useless strings into the PO files in the first place (and #2478 can help with that), but when they are there, we need to help people get them out of their way. |
The protobuf exercise asks people to decode a few fixed byte slices:
https://google.github.io/comprehensive-rust/uk/lifetimes/exercise.html
Some of the messages in the slices are fixed English strings, such as “home”. They should thus not be translated into other languages.
This should fix the CI. I guess it wasn’t caught before merging because of a parallel update.