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

in-JSON reused keys are treated as unused #33

Closed
mynormeza opened this issue Nov 17, 2019 · 0 comments · Fixed by #76
Closed

in-JSON reused keys are treated as unused #33

mynormeza opened this issue Nov 17, 2019 · 0 comments · Fixed by #76
Labels
Type: Bug Bug or Bug fixes

Comments

@mynormeza
Copy link

When you reuse keys in a JSON files and never use it in code, they're treated as never used. This is an example of my keys being reused, common keys are reused with the sintax @: in validationFields:

"common": {
        "name": "Nombre",
        "yes": "Si",
        "no": "No",
        "email": "Correo",
        "password": "Contraseña"
    },

    "validationFields": {
        "email": "@:common.email",
        "password": "@:common.password",
        "name": "@:common.name",
        "confirmPassword": "Confirmar contraseña"
    }

Seems like you need to use the keys specifically with vue-i18n functions, cause this also happens when you integrate with another library. For example, in my JSON, the object validationFields is used in a validation library, never use with vue-i18n functions and because of that is always treated as unused keys.

With this behaivour it's hard to know when you have unused keys.

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

Successfully merging a pull request may close this issue.

2 participants