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

go18n extract badly handels escapted characters #160

Closed
hanzei opened this issue Apr 15, 2019 · 0 comments · Fixed by #165
Closed

go18n extract badly handels escapted characters #160

hanzei opened this issue Apr 15, 2019 · 0 comments · Fixed by #165

Comments

@hanzei
Copy link
Contributor

hanzei commented Apr 15, 2019

If a message contains a escaped character e.g. " go18n extract escapes it again.

E.g.: If you have two messages:

	a = &i18n.Message{
		ID:    "a",
		Other: "a \" b",
	}
	b = &i18n.Message{
		ID:    "b",
		Other: `a " b`,
	}

go18n extract creates the following files:

json
  "a": "a \\\" b",
  "b": "a \" b",
toml
"a" = "a \\\" b"
"b" = "a \" b"
yaml
a: a \" b
b: a " b

As you can see the extracted messages for b are correct, but for a they contain two backslashes to much.

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

Successfully merging a pull request may close this issue.

1 participant