-
Notifications
You must be signed in to change notification settings - Fork 72
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
hot-reload/incremental build JSON language files #43
Conversation
breaking change: `path` option is deleted and users should load language JSON files using gatsby-source-filesystem then load it using GraphQL query.
@jngbng can we display a warning that the I'd also like to thank you once again for your work on this. It is much appreciated! |
@jdtzmn Thanks for good suggestion. The maintainer will pick the version when releasing to NPM as this project manages version using Displaying a warning is a good idea! But |
@jngbng Makes sense. I was reviewing the PR and I saw the section in the README.md and figured I should mention it. I found the following issue that addresses where to display deprecation warnings: They recommend using the |
@jdtzmn Thanks for your suggestion. Now plugin prints an error message when deprecated "path" option still exists in plugin option. |
I will check it asap, thanks for your contribution |
If we are moving back to graphql we should also support loading namespaces separately. This is actually what I wanted to implement next and I need it myself. If it is a big page with lots of translation it does not make sense to load those translations on other pages but at the same time, you can have common translations for header, for example. Is it going to work with a query like this: query($language: String!) {
locales: allLocale(filter: {lng: {eq: $language}, ns: {regex: "/(common|about)/"}}) {
edges {
node {
ns
data
lng
}
}
}
} Ideally, we should simplify it somehow or at least document Another thing is that the |
breaking change:
path
option is deleted and users should load language JSON files usinggatsby-source-filesystem then load it using GraphQL query.
fix #4