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

The keyPrefix argument is ignored in JavascriptLexer, and not in JsxLexer #737

Open
ohardy opened this issue Dec 21, 2022 · 2 comments
Open

Comments

@ohardy
Copy link

ohardy commented Dec 21, 2022

To Reproduce

Name this file with .ts extension (configured with JavascriptLexer) and the keyPrefix is ignored, if you use JsxLexer instead, it's works

export default function useArticlesFilter() {
  const { t } = useTranslation('filters', { keyPrefix: 'articles' });

  return useMemo(() => {
    return {
      menuTitle: t('menu'),
      badge: {
        Component: ArticlesBadge,
      },
      panel: {
        Component: ArticlesPanel,
        query: ArticlesPanelQuery,
      },
    };
  }, [t]);
}

Expected behavior

Keyprefix should not be ignored

@thomasmery
Copy link

I can confirm this behaviour

I could try and look into it but someone with more knowledge of the project would be more efficient I guess

hope this can be addressed

thanks

@karellm
Copy link
Member

karellm commented Apr 4, 2023

@thomasmery You are welcome to have a look. Thanks!

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