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

Cannot use nested structure of next-intl messages with Sherlock #124

Open
leandroluk opened this issue Nov 24, 2024 · 1 comment
Open

Cannot use nested structure of next-intl messages with Sherlock #124

leandroluk opened this issue Nov 24, 2024 · 1 comment

Comments

@leandroluk
Copy link

Looking for documentation of next-intl messages we can create nested message strucute and call this slicing with dots like this

{
  "About": {
    "title": "About us"
  }
}

And use in components like:

import {useTranslations} from 'next-intl';
 
export default function About() {
  const t = useTranslations('About');
  return <h1>{t('title')}</h1>;
}

If I have a sherlock plugin with a inlang project configured, sherlock does not recognize the structure of the messages and returns an error like

image

Copy link
Member

Sherlock does not seem to recognize the namespace About in useTranslations('About').

Which inlang plugins are you using? They can be found in the modules property in the settings.json file.

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

2 participants