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 🙏

© 2025 – Pkg Stats / Ryan Hefner

tranzlate.js

v1.1.2

Published

Translate your string catalogs to any language | 将您的字符串目录翻译成任何语言 | Traduzca sus catálogos de cadenas a cualquier idioma | Traduisez vos catalogues de chaînes dans n'importe quelle langue

Readme

https://github.com/wkaisertexas/tranzlate/assets/27795014/6702dc3c-7f4b-4619-b792-e47949c5b373

Tranzlate CLI 界面

支持的最低 Node.js 版本为 v14

  1. 全局安装 tranzlate

    npm install -g tranzlate.js
  2. OpenAI 获取您的 API 密钥

    注意:如果您还没有账户,您需要创建一个账户并设置计费。

  3. 设置密钥,以便 tranzlate 可以使用它。 可以通过运行以下命令实现:

    echo export OPENAI_API_KEY=<your token> >> ~/.bashrc

    或者,在运行命令时提供密钥

tranzlate

然后你会得到如下输出,它会引导你完成翻译字符串目录的过程:

┌   tranzlate: 自动字符串翻译
│
◇  输入文件
│  Localizable.xcstrings
│
◇  输出文件
│  Localizable.xcstrings
│
◆  选择要翻译的语言。
│  ◻ 阿拉伯语
│  ◻ 加泰罗尼亚语
│  ◻ 中文(简体)
│  ◻ 中文(繁体)
│  ◻ 克罗地亚语
│  ◼ 捷克语
│  ◼ 丹麦语
│  ◻ 荷兰语
│  ◻ 英语
│  ◻ 英语(澳大利亚)
│  ◻ 英语(加拿大)
│  ◻ 英语(英国)
│  ◻ 英语(美国)
│  ◻ 芬兰语
│  ◻ 法语
│  ◻ 法语(加拿大)
│  ◻ 德语
│  ◻ 希腊语
│  ◻ 希伯来语
│  ◻ 印地语
│  ◻ 匈牙利语
│  ◼ 印度尼西亚语
│  ◻ 意大利语
│  ◻ 日语
│  ◻ 韩语
│  ◻ 马来语
│  ◻ 挪威语
│  ◻ 波兰语
│  ◼ 葡萄牙语(巴西)
│  ◻ 葡萄牙语(葡萄牙)
│  ◻ 罗马尼亚语
│  ◻ 俄语
│  ◻ 斯洛伐克语
│  ◻ 西班牙语(墨西哥)
│  ◼ 西班牙语(西班牙)
│  ◻ 瑞典语
│  ◻ 泰语
│  ◻ 土耳其语
│  ◼ 乌克兰语
└  ◻ 越南语

https://github.com/wkaisertexas/tranzlate/assets/27795014/5ae6ca30-d030-4ec8-8c59-e2d1593084dc

由于翻译工具只支持单一语言显得有些讽刺,所以我们支持更改配置语言。您可以通过运行以下命令设置语言:

tranzlate set-language <language>

其中 <language> 是以下之一:

例如,如果你想切换到简体中文,你可以通过将 LANGUAGE 值设置为 zh-Hans 来做到这一点:

tranzlate set-language zh-Hans

这将您的语言设置为简体中文。

支持对 Markdown 的翻译。要进入 Markdown 模式,请运行:

tranzlate markdown

系统会提示您输入要翻译的 Markdown 文件或文件模式。输出翻译会在每个文件名末尾附加ISO语言代码。例如, 如果您将 README.md 翻译为简体中文(zh-Hans),输出文件将为 README.zh-Hans.md

┌   tranzlate: 自动 Markdown 翻译
│
◇  输入 Markdown 文件或文件模式
│  ./README.md
│
◇  选择要翻译的语言
│  fi - 芬兰语, hu - 匈牙利语, pl - 波兰语, ru - 俄语
│
◇  选择一个模型
│  gpt-3.5-turbo
◆  正在翻译 README.md...

[!NOTE] Markdown 翻译处于测试阶段。如有任何问题,请及时反馈。

429 错误

有些用户报告从 OpenAI 收到 429 错误。这是由于错误的计费设置或超出配额使用导致的。请按照这个指南来解决。

您可以在这个链接上激活计费。如果没有 OpenAI 的有效资助,请确保添加支付方式。

我不是一名语言专家。我的翻译能力仅限于中学水平的西班牙语。然而,我相信软件及其重要性。软件的开发对象很重要。本地化不应也永远不应是事后考虑。通过利用 AI 翻译工具,可以更早地在产品开发期间就软件对不同社区的影响进行对话,而不是在后期进行。

加速有关软件影响的对话,使在功能集锁定之前实现有意义的改变。这就是我相信常常不完美的 AI 翻译工具的力量的原因。不要让完美成为良好的敌人。

简单翻译字符串目录,以及希望未来会有更多的文件格式,是我创建 tranzlate 的原因。

如果您想帮助修复错误或实现 Issues 中的功能,请随时进行。Swift 开发对我来说还是个新领域,因此我很赞赏社区的反馈。

Alt

感谢 ai-shell 提供的 README 模板。