Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # 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 · May be fixed by #1083
Open

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

ohardy opened this issue Dec 21, 2022 · 2 comments · May be fixed by #1083

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!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
3 participants