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

Namespace validation #194

Open
ipriel opened this issue Mar 27, 2024 · 0 comments
Open

Namespace validation #194

ipriel opened this issue Mar 27, 2024 · 0 comments

Comments

@ipriel
Copy link

ipriel commented Mar 27, 2024

Is your feature request related to a problem? Please describe.

I'm always frustrated when making content changes (Ex. adding or removing translation keys from a namespace) that there is no way to validate that the change was made in all of the locales.

Describe the solution you'd like

What I am thinking is allowing the use of ts files for namespace definition. That way people can define a type or interface if they want, and the IDE will flag any issues.

Describe alternatives you've considered

An alternative would be a config (similar to the one in Astro Collections) that defines the schema, and then validate the schema on build (or through a CLI command).

While the similarity in usage to the existing Astro Collections config might be more familiar for Astro devs, the ts method feels simpler in usage. I'm unsure which would be easier to implement.

Additional context

If relevant, I am happy to try writing an implementation of this.

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

1 participant