Socket
Book a DemoInstallSign in
Socket

@toil/localize-cli

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@toil/localize-cli

a cross-platform utility for interacting with localization files

0.0.3
unpublished
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

@toil/localize-tui

tui-based utility for quick and easy localization

To use:

bunx @toil/localize-tui
npx @toil/localize-tui

Config

The utility can be configured using the localize.config.json or l10n.config.json config in the root of the project (where you will run the utility).

Example of localize.config.json:

{
  "rootPath": "./src",
  "localesDir": "locales",
  "hashFile": "hashes.json",
  "ignoreLocales": ["de"],
  "service": "yandexbrowser"
}

rootPath - the path to the folder that will be considered the main folder of the project. For example, if the translation files in the project are in ./src/locales, then the rootPath should be ./src

localesDir - name of the translation folder

hashFile - the name of the file with translation hashes

ignoreLocales - localization files that will be ignored by the utility

service - a service for receiving a translate. In this case, Yandex Translate is used. Other available services:

  • yandexbrowser - Yandex Translate (free)
  • yandexcloud - YandexCloud (free)
  • yandextranslate - Yandex Translate (free)
  • msedge - Microsoft Edge Translate (free)

Any of these parameters can be removed.

TODO:

  • Generate phrase
  • Delete phrase
  • Get all locales
  • Update hashes
  • [] Diff locales
  • [] Add locale files
  • [] Fun languages

FAQ

Почему используется spark-md5, а не crypto-js или нативная реализация из NodeJS?

  • это банально быстрее (в ~1.35 раза)
  • нативная реализация md5 появилась, только, в NodeJS 21+, что еще сильнее увеличило бы требования для запуска

Keywords

localize

FAQs

Package last updated on 10 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.