t-function-matcher

t-function-matcher

Plugin

This plugin enables Sherlock (VS Code extension) to recognize t("key") function calls used by most i18n libraries.

Sherlock inline preview

What it does

  • Inline previews: See translations directly in your code editor
  • Message extraction: Extract hardcoded strings into messages
  • Linting: Get warnings for missing or invalid message references

Supported file types

  • TypeScript (.ts, .tsx)
  • JavaScript (.js, .jsx)
  • Svelte (.svelte)
  • Vue (.vue)
  • Astro (.astro)

Installation

Add the plugin to your project.inlang/settings.json:

{
  "modules": [
    "https://cdn.jsdelivr.net/npm/@inlang/plugin-t-function-matcher@latest/dist/index.js"
  ]
}

Then install Sherlock from the VS Code marketplace.

Matched patterns

The plugin recognizes these patterns:

PatternExample
Simple callt("welcome")
With variablest("greeting", { name: "World" })
With namespacet("common:button")
In JSX{t("label")}