C

next-i18next/copy-keys

How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

This codemod copies specific keys from one translation namespace to another, for each of the supported languages.

The codemod expects the following arguments:

  • oldNamespace is the name of the namespace from which the keys are taken,
  • newNamespace is the name of the namespace to which the keys are copied,
  • keys is a comma-separated list of keys.

You need to pass these arguments using the Codemod Arguments' settings in Codemod VSCode extension or Codemod CLI.

Before

.../en/common.json

json

.../en/new.json

json

After

.../en/common.json

json

.../en/new.json

json

Ready to contribute?

Build your own codemod and share it with the community.