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

Using description as MessageID makes goi18n fail #250

Closed
voroskoi opened this issue Apr 6, 2021 · 2 comments
Closed

Using description as MessageID makes goi18n fail #250

voroskoi opened this issue Apr 6, 2021 · 2 comments

Comments

@voroskoi
Copy link

voroskoi commented Apr 6, 2021

Hi,

First of all: Thank You very much for this amazing package.

I have the following active.en.toml file:

description = "Description"

[comment]
one = "Comment"
other = "Comments"
zero = "No Comment"

If I run goi18n.exe merge .\active.en.toml against it I get the following error message:

failed to load message file .\active.en.toml: expected value for key "comment" be a string but got map[string]interface {}{"one":"Comment", "other":"Comments", "zero":"No Comment"}

Changing 'desctiption' in the first line to anything else makes the problem go away.
Calling LoadMessageFile method also fails with this input.

I have tried to convert the toml file to yaml too, but does not help.

I am using github.com/nicksnyder/go-i18n/v2 v2.1.2.

@voroskoi
Copy link
Author

Using other gives the same result.

@jmooring
Copy link

jmooring commented May 2, 2021

Duplicate of #209

@voroskoi voroskoi closed this as completed May 9, 2021
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

No branches or pull requests

2 participants