-
Notifications
You must be signed in to change notification settings - Fork 277
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
translation file with key "id" leads LoadMessageFile to fail silently #209
Comments
Hi, Lines 193 to 204 in 26334ab
your "id" = "Id" is identified as a reserved key and isMessage returns true and your value is not added as the translation text -> it is blank
The reserved key There's a pull request #208 pending, which would give you an error message in the terminal when you try doing what you did while running the EDIT: After thinking about this for a couple minutes, the new error message would be misleading in this edge case. Some check in |
Hi MJacred, |
I just encountered this issue, it was hard to find this topic as I got the problem with the key "other". Even if it's a 2 years old issue, do you know when there will be an error returned by |
Makes it an error to provide data that mixes reserved message keys with unreserved ones. Previously the unreserved keys would be ignored, but this caused surprising behavior where if someone added a message that had a key with a reserved word, it would silently break the whole translation file. This change turns that situation into an error. Resolves #209
Context : every toml file with a key to translate like
"id" = "Id"
LoadMessageFile returns no error but every use of Localize function returns an empty string (like it would be if there was an error in LoadMessageFile)
The problem seems to be the identifier "id" itself. If i change it to "ed" or "ad", the problem goes away.
Is it a magic string used internally ? I use the latest V2 version of the lib.
The text was updated successfully, but these errors were encountered: