-
Notifications
You must be signed in to change notification settings - Fork 18k
x/text: printer.Printf works but printer.Print does not (all variants of print/printf) #41781
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
Comments
Change https://golang.org/cl/356314 mentions this issue: |
Translations are only done for format strings or substitutions in In my opinion, also translating strings for To print without a message, one can use |
Just ran into this as well; it is unclear to me why this is undesirable, but to be clear this also happens for
The message "Foo" will not be extracted. But I very clearly meant for it to be translated. EDIT: also the suggested workaround results in |
I just realized that the reason it's likely undesirable is that we're not sure if the string is an id or a message if we're not using |
closing as working as intended. |
When using the message printer, I can translate fine with the Printf variants (Sprintf, Fprintf, Printf) but I don't get the translation for the Print variants (Sprint, Fprint, Print).
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
The following code is also available on the playground: https://play.golang.org/p/FHjZ3a8ug51
What did you expect to see?
What did you see instead?
@kaskavalci mentioned this problem in #26767 (comment)
cc @mpvl
The text was updated successfully, but these errors were encountered: