x/text: first string in catalog returned when the given string is not in the catalog #30924
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
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?
Generate a catalog.go file with the following strings (for example):
Now, translate a string that's not in the catalog.
What did you expect to see?
I would expect to get back the original string I passed to the p.Println() function if it does not match any string in the catalog.
In this case, I expect to get back:
This string is not in the catalog
.What did you see instead?
p.Println() returns the first string in the catalog. In this case, I get back:
This is the first string in the catalog
.The text was updated successfully, but these errors were encountered: