x/text: messages cannot contain '{' #27849
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
)?go version go1.11 darwin/amd64
golang.org/x/text 905a571
What did you do?
Ran
gotext update
with a message catalog containing the Translationexpected '{'
.What did you expect to see?
Correct import of message catalog.
What did you see instead?
There are really three problems here. First, the substitution mechanism used in translations is too simplistic; it doesn't have any escaping mechanism to allow for the use of a bare '{' in the string. Second, the error message is wrong; it should say unmatched '{', not unmatched '}'. And third, the error message is utterly useless since it doesn't identify which translation has the problem.
The text was updated successfully, but these errors were encountered: