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

@nuykon/vue-translation-manager

v1.3.28

Published

Translate strings in your app in an interactive way

Readme

@nuykon/vue-translation-manager

This is a fork - https://github.com/cyon/vue-translation-manager , which fixed some bugs and added new functionality, primarily for working with Cyrillic texts (those for initially Russian-language applications)

version JavaScript Style Guide

original docs

Interactive dictionary generator for internationalization from vue components(sfc).

The utility only works with sfc, which extracts text only from vue templates and replaces them with an i18n.t function call.


Installation

npm install @nuykon/vue-translation-manager --save-dev

or

yarn add @nuykon/vue-translation-manager -D

Customization

Create a config file in the root of your project - .vue-translation.js

// .vue-translation.js
const path = require('path')
const { JSONAdapter } = require('@nuykon/vue-translation-manager')

module.exports = {
  srcPath: path.join(__dirname, 'src'),
  adapter: new JSONAdapter({ path: path.join(__dirname, 'i18n/messages.json') }),
  languages: ['ru', 'en']
}

And create empty json files (i18n/messages.json)

{}

If you give a path to a file, we're automatically assuming you're using a single file for your translations. If the given path is a directory we'll look for files named like this: [language].json.

// .vue-translation.js
const path = require('path')
const { JSONAdapter } = require('@nuykon/vue-translation-manager')

module.exports = {
  srcPath: path.join(__dirname, 'src'),
  adapter: new JSONAdapter({ path: path.join(__dirname, 'i18n/') }),
  languages: ['ru', 'en']
}

And create empty json files (i18n/ru.json, i18n/ru.json)

{}

Available Commands

nuykon-vtm [command]

Commands:
  nuykon-vtm translate     Translate vue files in path
  nuykon-vtm clean         Remove unused translations from
                                        translations resource
  nuykon-vtm add [key]     Add a new translation to the resource
                                        file(s)
  nuykon-vtm edit [key]    Edit an existing translation
  nuykon-vtm delete [key]  Delete an existing translation
  nuykon-vtm validate      Checks if translated messages are available in all
                       configured languages

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

translate

This command starts the interactive translation manager. It looks through all the .vue files inside your configured srcPath and detects untranslated strings.

In an interactive way you then can provide translations for all the configured languages and the strings in the component will get replaced and the translations saved. You can repeat this as long as there are untranslated strings in at least one of your components.

Optionally you can pass the --ask-key parameter. Per default we generate a key for every untranslated string based on where it occurs and on the string itself. If you don't want this you should provide the mentioned parameter and it will ask you to provide a key for every string to translate. If you are content with the default string then just hit enter. You can also enter a complete new key, separated by dots, or just enter a single word. Then it will just replace the last part of the suggested key.

The vue-translation-manager will also attempt to produce interpolated strings when there is dynamic data inside a text.

translate command params

--ask-key - By default, false, the key will be generated automatically (either by translation from Russian into English(google translate), or by transliteration(Я -> YA)). If you enable this option, the utility will prompt you to enter the key name.

nuykon-vtm translate --ask-key

--key-gen-mode - 'translit' - default or 'translate'. the key will be generated automatically - by transliteration(Я -> YA) or by translation from Russian into English(google translate api)

nuykon-vtm translate --key-gen-mode

--max-word-in-key - The key is generated from the source text, the option allows you to limit the number of words from which the key will be generated. default - 4

nuykon-vtm translate --max-word-in-key

--enable-message-translate - Enabling this option allows you to automatically translate key values from Russian to English. (google translate api)

nuykon-vtm translate --enable-message-translate

--ignore-words-in-path - Exclude words from the path

default - 'src,components,component,source,test'

nuykon-vtm translate --ignore-words-in-path=myFolder1,myFolder2

If you get the error "code: ERR_REQUIRE_ESM" when running commands, you need to temporarily remove it from the package.json string is "type": "module",`

If your application is inside another one and you get an error - command not found: nuykon-vtm

then try the command - node ./node_modules/@nuykon/vue-translation-manager/bin.js translate