$ npm install -D tunga
tunga — migration

· Header.tsx
export function Header() {
  return (
    <button>Save</button>
  );
}
+ · Header.tsx
import { t } from "@/i18n";

export function Header() {
  return (
    <button>{t("ui.header.save")}</button>
  );
}

scan 01
$ tunga scan

extract 02
$ tunga extract

apply 03
$ tunga apply

tunga check · tunga verify · tunga report · tunga init

JSX text

<button>Save</button>
→ ui.header.save

JSX attributes

<input placeholder="Search products" />
→ ui.search_box.search_products

String literals

const msg = "No results found";
→ ui.search_results.no_results_found

Template literals

const t = `Hello ${name}`;
→ "Hello {{name}}"

Mixed JSX interpolation

<p>Hello {user.name}, you have {count}</p>
→ t("ui.profile.summary", { name, count })

Key strategies

path → ui.header.save
component → ui.product_card.add_to_cart
text → ui.save_changes

// tunga-ignore-next-line
deny: { patterns, objectKeys, callees }

--dry-run

git diff

no-overwrite

location-aware

$npm install -D tunga && npx tunga init