I use react-i18next
in my project.
Referencing on this comment,
Now I use i18n-unused to identify unused translation.
module.exports = {
localesPath: 'assets/locales',
srcPath: 'src',
};
When I run i18n-unused display-unused
, it shows that lots of translations are unused, but actually most of those translations are being used.
Result
Unused translations count: 840
...
'translation.header.documents'
...
In my code
import { useTranslation } from 'react-i18next';
...
const { t } = useTranslation();
...
return (
<Header title={t('header.documents')}/>
)
Is there any solution for it?