You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ah, of course, the json5 library will avoid quoting keys if possible because that is valid in JSON5. The title key is a single word with no special characters that need quoting so json5.stringify is being opportunistic and trying to save us a few bytes.
So the issue here is that our i18n assets are in JSON5 format for human readability, but our current ESLint rules are validating them as JSONC (JSON with comments). This would be partially solved if we switched our ESLint rules to use JSON5 (see #2317).
Having said that, I'm not sure if we actually need our i18n assets to be in JSON5, as it seems we are essentially only using comments, and the Angular frontend is using them in plain JSON format anyway (see src/ngx-translate-loaders/translate-server.loader.ts).
Describe the bug
The yarn
merge-i18n
script unquotes thetitle
key, which results in an invalid json5 file (at least according to our eslint rules).To Reproduce
Steps to reproduce the behavior:
custom
theme:src/assets/i18n/en.json5
and see thetitle
key is unquoted:Expected behavior
According to our ESLint rules, json5 keys must be quoted, though it doesn't seem this is a requirement from the json5 spec.
This issue might be related: json5/json5#32
The text was updated successfully, but these errors were encountered: