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

translation-autocomplete

v1.0.9

Published

Automatically detect missing translations and fill them using AI-powered translation APIs

Readme

Translation Autocomplete 🚀

Automatically detects missing translations in i18n JSON files and fills them using AI-powered translation APIs like Google Translate, DeepL, OpenAI (GPT-4), and Gemini.

Keep your translations consistent and up-to-date effortlessly!


📌 Features

✔️ Detect missing translations in structured JSON files
✔️ Automatically translate missing texts using AI-based APIs
✔️ Supports multiple translation services:

  • Google Translate 🌍
  • DeepL 📖
  • OpenAI (GPT-4) 🤖
  • Gemini (Google AI) 🔥
    ✔️ CLI tool for easy project integration
    ✔️ Supports nested JSON structures
    ✔️ Customizable API settings via CLI or .env file

📥 Installation

Install globally via NPM:

npm install translation-autocomplete

or use without installation:

npx translation-autocomplete --help

🚀 Usage Guide

🔍 1. Check for Missing Translations

Find missing translations in your localization files:

npx translation-autocomplete check

Example Output:

❌ Missing translations found:
  - home.hero.title (en → tr)
  - home.hero.subtitle (en → tr)

🔄 2. Auto-Fill Missing Translations

Automatically translate missing entries using AI-powered services:

npx translation-autocomplete check --fix

✅ This command fills missing translations and updates JSON files.

Example Output:

✅ home.hero.title → "Ana Sayfa Başlığı" (Translated using Google Translate)
✅ home.hero.subtitle → "Ana Sayfa Alt Başlığı" (Translated using Google Tanslate)

⚙️ 3. Configure API Settings

You can set up API keys and preferences via CLI:

npx translation-autocomplete config

This allows you to configure:

  • Translation API key
  • Source & target languages
  • Translation service (Google, DeepL, OpenAI, Gemini)
  • JSON file path

🔧 Configuration File (.env)

Alternatively, create a .env file to store API settings:

TRANSLATION_API_KEY=your-api-key
SOURCE_LANGUAGE=en
TARGET_LANGUAGES=tr,es,de
TRANSLATION_SERVICE=google
I18N_PATH=./src/messages

Supported Services:

  • google → Google Translate
  • deepl → DeepL
  • openai → OpenAI GPT-4
  • gemini → Google Gemini

📖 Example JSON File Structure

Translation files should be in nested JSON format, like this:

📂 English (en.json)

{
  "home": {
    "hero": {
      "title": "Welcome to My Portfolio",
      "description": "I build modern web applications."
    },
    "contact": {
      "cta": "Get in Touch"
    }
  }
}

📂 Turkish (tr.json)

{
  "home": {
    "hero": {
      "title": "Portföyüme Hoş Geldiniz"
    }
  }
}

check --fix will automatically fill missing translations in tr.json.


🎯 CLI Commands Overview

| Command | Description | |---------|-------------| | npx translation-autocomplete check | Detect missing translations | | npx translation-autocomplete check --fix | Auto-translate missing entries | | npx translation-autocomplete config | Configure API settings | | npx translation-autocomplete --help | Show help menu |


🌎 Language Support

Supports any language that is available on Google Translate, DeepL, OpenAI, or Gemini.


📜 License

MIT License © 2025 Selman Yasin Aktaş


🌟 Contribute & Support

🔹 Found a bug? Open an Issue
🔹 Want to improve the project? Submit a Pull Request
🔹 Like this project?Star it on GitHub!


📢 Why Use Translation Autocomplete?

  • ✅ Saves time by automatically filling missing translations
  • ✅ AI-powered translations for accuracy
  • ✅ CLI-based and easy to integrate into any project
  • ✅ Supports multiple translation services

💬 Need Help?

If you have any questions or feedback, feel free to open an issue or reach out via GitHub discussions.


🚀 Get Started Today!

Run this command and ensure your translations are always up-to-date:

npx translation-autocomplete check --fix

🔹 Happy Coding! 🚀🎯