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/cmd/gotext: "/" not extracted #50288

Open
remko opened this issue Dec 21, 2021 · 0 comments
Open

x/text/cmd/gotext: "/" not extracted #50288

remko opened this issue Dec 21, 2021 · 0 comments
Labels
NeedsInvestigation
Milestone

Comments

@remko
Copy link

@remko remko commented Dec 21, 2021

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

go version go1.16.3 darwin/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
GOHOSTARCH="amd64"
GOHOSTOS="darwin"

What did you do?

Run go generate . on a module with only the following file:

package translations

//go:generate gotext -srclang=en update -out=catalog.go -lang=en,nl .

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

func dummyMessages(p *message.Printer) {
	p.Printf("/b")
	p.Printf("/")
	p.Printf("/a")
}

What did you expect to see?

The string / to appear in locales/en/out.gotext.json

What did you see instead?

Only the strings /b and /a.

@gopherbot gopherbot added this to the Unreleased milestone Dec 21, 2021
@dmitshur dmitshur added the NeedsInvestigation label Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation
Projects
None yet
Development

No branches or pull requests

3 participants