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

You need to add a graphql query to every page like this #151

Open
viktormoskalev07 opened this issue Aug 18, 2022 · 3 comments
Open

You need to add a graphql query to every page like this #151

viktormoskalev07 opened this issue Aug 18, 2022 · 3 comments

Comments

@viktormoskalev07
Copy link

viktormoskalev07 commented Aug 18, 2022

I am using Strapi , so i don't have any json files for translations in my project , how can i switch off that message?

wrapPageElement.js:114
No translations were found in "locales" key for "/team/".

You need to add a graphql query to every page like this:

 export const query = graphql` 
  query($language: String!) { 
    locales: allLocale(language: {eq: $language}) {
      edges {
        node {
          ns
          data
          language
        }
      }
    }
  }
@CompuWiser
Copy link

Add this line at the top of the file

import { graphql } from "gatsby";

I spent hours debugging to find this out!!

@dev-smart-ui
Copy link

dev-smart-ui commented Dec 20, 2022

Add this line at the top of the file

import { graphql } from "gatsby";

I spent hours debugging to find this out!!

Which file do you mean I receive this error on every page , Even if I don’t have any requests

@CompuWiser
Copy link

Add this line at the top of the file

import { graphql } from "gatsby";

I spent hours debugging to find this out!!

Which file do you mean I receive this error on every page , Even if I don’t have any requests

On each page you use graphql like this

 export const query = graphql` 
  query($language: String!) { 
    locales: allLocale(language: {eq: $language}) {
      edges {
        node {
          ns
          data
          language
        }
      }
    }
  }

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

3 participants