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

@adobe-addon-i18n/cli

v0.2.0

Published

A local AST compiler that parses your React source files, extracts every `t()` call, and non-destructively syncs the discovered keys into your locale JSON files. Includes a built-in translation engine powered by the Google Translate API.

Readme

@adobe-addon-i18n/cli

A local AST compiler that parses your React source files, extracts every t() call, and non-destructively syncs the discovered keys into your locale JSON files. Includes a built-in translation engine powered by the Google Translate API.

Runs entirely on your machine during development — it is never part of the browser bundle.


Installation

npm install --save-dev @adobe-addon-i18n/cli

Commands

sync

Scans your source directory for t() calls (in files that import useTranslation) and appends any new keys into your locale JSON files as empty strings. Existing translations are never overwritten.

npx adobe-addon-i18n sync --src ./src --locales ./locales --langs en,fr,de

| Flag | Default | Description | |---|---|---| | --src <path> | ./src | Source directory to scan for t() calls | | --locales <path> | ./locales | Directory where locale JSON files are written | | --langs <list> | en | Comma-separated BCP 47 language tags (e.g. en,fr,zh-Hant) |

Language code validation: All values passed to --langs are validated against the BCP 47 format. Invalid codes (e.g. path traversal sequences) are rejected before any files are touched.

Dynamic keys: Only static string literals are extracted (e.g. t('my.key')). Template literals, function calls, or ternaries used as the key argument (e.g. t(`dynamic.${part}`)) cannot be statically analysed and will generate a warning. Add those keys to your JSON files manually.


translate

Scans your locale directory for empty-string values (""), uses the source language file as the reference, and fills in translations via the Google Translate API.

npx adobe-addon-i18n translate --src en --locales ./locales

| Flag | Default | Description | |---|---|---| | --src <lang> | en | Source language to translate from (BCP 47 tag) | | --locales <path> | ./locales | Directory containing your locale JSON files | | --no-translate | — | Skip all API calls (see Privacy section below) | | --concurrency <n> | 5 | Max number of parallel translation requests |


⚠️ Privacy & Terms of Service Notice

The translate command uses the unofficial Google Translate scraper endpoint (client=gtx). This endpoint is not part of Google's public API, has no SLA, and its use may conflict with Google's Terms of Service.

Your translation key strings are sent to Google's servers in plain text. This includes any UI copy, error messages, or labels in your application. Do not use the translate command if:

  • Your strings contain personally identifiable information (PII).
  • Your organisation has data-residency or GDPR obligations.
  • Your CI environment is air-gapped or has restricted outbound network access.

Use the --no-translate flag to suppress all network calls:

npx adobe-addon-i18n translate --src en --locales ./locales --no-translate

Security

  • Prototype pollution protection: Key paths containing __proto__, constructor, or prototype segments are rejected with an error.
  • Path traversal protection: Language codes from --langs are validated against a strict BCP 47 regex. Constructed file paths are verified to stay within the locales directory before any reads or writes occur.
  • JSON schema validation: Locale files that do not contain a plain JSON object (e.g. arrays, bare strings) are rejected with a descriptive error instead of silently corrupting the merge.

tsconfig.json Awareness

The sync command automatically looks for a tsconfig.json in your current working directory and passes it to the TypeScript compiler. This ensures that path aliases and custom compiler settings from your project are respected during AST parsing.


License

MIT