i18next-parser
i18next-parser copied to clipboard
The keyPrefix argument is ignored in JavascriptLexer, and not in JsxLexer
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