← All recipes
Moderne licensed

Find i18n usage

Recipe IDorg.openrewrite.angular.search.find-i18n-usageArtifact@openrewrite/recipes-angular

Finds i18n usage indicators: legacy i18n configuration in angular.json (i18nLocale, i18nFile, i18nFormat, i18nMissingTranslation), $localize tagged template literals, and @angular/localize imports. Projects with these markers need @angular/localize installed and import '@angular/localize/init' in polyfills.ts for Angular 9+.

Composite recipeProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.angular.search.find-i18n-usage

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-angular

Definition

This recipe runs the following recipes in order.

  • Find i18n configuration in angular.jsonorg.openrewrite.angular.search.find-i18n-usage.angular-json
  • Find $localize usage in TypeScriptorg.openrewrite.angular.search.find-i18n-usage.typescript