npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nuxt-i18n-inspector

v0.1.1

Published

Nuxt module. See which translation key produced any text on the page.

Readme

nuxt-i18n-inspector

Point at any text in your Nuxt app. See the translation key that made it.

This is the Nuxt module for i18n-key-inspector. The inspector rewrites the loaded catalogue, so every message carries its key as an invisible prefix. It then reads that prefix back from the DOM. The key travels inside the string, so it survives v-html, attributes, and a section that hydrates long after the first paint.

Development only by default. A build registers nothing, so the inspector cannot reach your users by accident. Set enabled: true to keep it on a staging site.

Install

npx nuxi module add nuxt-i18n-inspector

Or by hand:

npm install --save-dev nuxt-i18n-inspector
export default defineNuxtConfig({
  modules: ['@nuxtjs/i18n', 'nuxt-i18n-inspector'],
})

Use it

Press Alt three times. Option on a Mac. A label appears in the corner, and the mode is on.

Then hold the same key. Every translated string lights up, and the one under the pointer shows its key. Hold the key and click to copy it. Three presses turn the mode off.

Until you press it, the module leaves the page alone.

Options

export default defineNuxtConfig({
  modules: ['@nuxtjs/i18n', 'nuxt-i18n-inspector'],

  i18nInspector: {
    keySeparator: '::',
    skipGroups: ['seo'],
    listSeparators: [',,'],
  },
})

| Option | Default | Purpose | | --- | --- | --- | | enabled | true in dev | Register the inspector. true in a build keeps it on staging | | activationKey | 'Alt' | Key to press, and then to hold | | activationPresses | 3 | How many presses turn the mode on | | activationWindowMs | 600 | How long one gap between presses may be | | keySeparator | '.' | What joins the parts of a key in the tooltip | | skipGroups | [] | Top-level groups to leave alone | | skipNestedGroups | [] | Group names one level in to leave alone | | listSeparators | [] | Separators your app splits one message on | | badge | true | Whether a corner label says the mode is on |

Which strings to skip

Skip copy that reaches only <title> and <meta>. Nobody can point at it, and a marked title travels into the analytics pageview. skipGroups: ['seo'] covers a top-level seo group. skipNestedGroups: ['meta'] covers a meta group that sits beside the strings of each page.

Copy that your app splits

A plural needs no configuration. The | in one note | {n} notes belongs to vue-i18n, and both branches get the key.

A list that your own code splits does need it. FAQ questions joined by ,, in one message become several nodes on the page. Pass listSeparators: [',,'], and every item carries the key.

What it works with

  • Nuxt 3.21 and later, and Nuxt 4. CI prepares the playground on both.
  • @nuxtjs/i18n 10, in both the composition and the legacy mode. Versions 8 and 9 use the same plugin name and the same Composer shapes, so they should work. CI does not test them yet.

Limits

  • A message that holds no literal text gets no key. There is nothing to carry the marker.
  • A component that calls t() once, outside a reactive scope, keeps the text it read when it was built. Those strings stay untagged until it is built again.
  • Editing a locale file with the mode on shows the new text for a moment, then the next pass restores the snapshot. Turn the mode off and on to pick it up.

Development

pnpm install
pnpm dev       # the playground on http://localhost:3000
pnpm verify    # format, comments, types, tests, build

License

MIT