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

@electerm/electerm-locales

v2.1.58

Published

electerm multi-language support pack

Downloads

12,090

Readme

electerm-locales

Test

English | 简体中文

electerm 多语言支持包。

🇺🇸 🇨🇳 🇧🇷 🇷🇺 🇪🇸 🇫🇷 🇹🇷 🇯🇵 🇰🇷 🇹🇼 🇩🇪 🇮🇩

开发

git clone git://github.com/electerm/electerm-locales.git
cd electerm-locales
npm i
cp config.sample.js config.js
npm start
# 自动同步 locales/* 到 ../electerm/node_modules/electerm-locales/locales/ 以便测试
# 并添加 pre-push 钩子,在每次推送前执行 lint 和 test

测试

npm run test
# 测试只是确保所有语言文件的键和顺序匹配

贡献

只需使用 locales/en_us.js 作为示例,fork 此仓库,添加你的编辑,然后提交 pull request。

确保在推送前运行 npm run test

创建新语言文件的脚本

为了让工作更轻松,我创建了一个脚本来帮助创建语言文件,它使用 AI API 翻译所有条目并创建新的语言文件。

# 从 siliconflow.cn 或 deepseek.com 获取 apiKey
# lang={语言代码} url="{api 地址}" model="{模型名称}" apiKey={apiKey} node bin/create-new-language-file-with-ai.js
# 然后它会在 locales 文件夹中创建 {语言代码}_{语言代码}.js

# 例如:
# 这将创建德语语言文件 `locales/de_de.js`
lang=de url='https://api.siliconflow.cn/v1/chat/completions' model='deepseek-ai/DeepSeek-V2.5' apiKey=xxxx node bin/create-new-language-file-with-ai.js
# 然后你可以审查和编辑以确保每个条目都正确

使用 AI API 添加新条目

你当然可以逐个翻译,我也提供了一个脚本来完成它。

# entry="{一级条目名称}" name="{属性名称}" text="{原始语言的文本}" url="{api 地址}" model="{模型名称}" apiKey={apiKey} node bin/translate-with-ai.js

# 示例:
entry=setting name=saveTerminalLogToFile text="save terminal log to file" url='https://api.siliconflow.cn/v1/chat/completions' model='deepseek-ai/DeepSeek-V2.5' apiKey=xxxx node bin/translate-with-ai.js

# 然后它会使用 AI 翻译将 saveTerminalLogToFile 条目添加到 setting 命名空间下的所有语言文件中

## 从所有文件中删除条目
entry=setting name=disableSshHistory node bin/remove-slot.js

更新所有文件中的现有条目

要更新所有语言文件中现有条目的值(针对给定的命名空间和键),请使用提供的脚本:

# entry="{命名空间}" name="{键}" data='{"en":"new English text", "zh-CN":"新的中文", ...}' node bin/update-entry.js

# 示例:更新 "setting" 命名空间下键 "saveTerminalLogToFile" 的值
entry=setting name=saveTerminalLogToFile data='{"en":"Save terminal log to file (updated)", "zh-CN":"保存终端日志到文件(已更新)"}' node bin/update-entry.js

# 仅限更新特定语言(例如,仅英语和中文):
entry=setting name=saveTerminalLogToFile to="en,zh-CN" data='{"en":"Save terminal log to file (updated)", "zh-CN":"保存终端日志到文件(已更新)"}' node bin/update-entry.js

如果键在任何文件中不存在,脚本将抛出错误。

使用代理

cp sample.env .env
# 然后编辑 .env,添加 socks 代理

支持的语言和创建者

贡献者

https://github.com/electerm/electerm-locales/graphs/contributors