I18n/Remove Unused Translations
Last update
Jul 24, 2024
This codemod removes unused i18n translations.
Example
This codemod supports removing several i18n unused translation patterns. The example below shows only one of the cases that might occur. For an exhaustive list of the supported patterns, please refer to the codemod's
test.ts
file.
Before:
import { useLocale } from '@calcom/lib/hooks/useLocale';export default function A() {const { t } = useLocale();return <p>{t('key1')}</p>;}
After:
{"key1": "key1","key2": "key2"}
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community