Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Latest commit

 

History

History

i18n

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Replace API Routes

Description

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"
}

Applicability Criteria

Any version of i18n.

Other Metadata

Codemod Version

v1.0.0

Change Mode

Autonomous: Changes can safely be pushed and merged without further human involvement.

Codemod Engine

Intuita File Transformation Engine

Estimated Time Saving

~3 minutes per occurrence

Owner

Intuita