Skip to content
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

x/text/message: Print, Println funcs do not do any language-specific formatting #45471

Open
vinser opened this issue Apr 9, 2021 · 2 comments
Open

Comments

@vinser
Copy link

@vinser vinser commented Apr 9, 2021

What version of Go are you using (go version)?

$ go version
on Playground and in Docker

Does this issue reproduce with the latest release?

I don't know because I didn't use it before

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
on Playground and in Docker

What did you do?

package main

import (
	"golang.org/x/text/language"
	"golang.org/x/text/message"
	"os"
)

func main() {
	message.SetString(language.Dutch, "soccer", "voetbal")
	p := message.NewPrinter(language.Dutch)
	p.Println("soccer")
	p.Fprintln(os.Stdout, "soccer")
	p.Print("soccer", "\n")
	p.Printf("soccer", "\n")

}

https://play.golang.org/p/LjQ6DfG1CJX

What did you expect to see?

voetbal
voetbal
voetbal
voetbal

What did you see instead?

soccer
soccer
soccer
voetbal

@vinser vinser changed the title golang.org/x/text/message Print, Println funcs do not do any language-specific format golang.org/x/text/message Print, Println funcs do not do any language-specific formatting Apr 9, 2021
@vinser vinser changed the title golang.org/x/text/message Print, Println funcs do not do any language-specific formatting x/text/message: Print, Println funcs do not do any language-specific formatting Apr 9, 2021
@gopherbot gopherbot added this to the Unreleased milestone Apr 9, 2021
@gopherbot
Copy link

@gopherbot gopherbot commented Apr 29, 2021

Change https://golang.org/cl/315109 mentions this issue: message: properly translate when using Print

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants