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 🙏

© 2024 – Pkg Stats / Ryan Hefner

tranzlate.js

v1.0.3

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

Downloads

22

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=<你的密钥> >> ~/.bashrc

    或者,执行命令时提供密钥

tranzlate

然后你会看到如下的输出,它将带你走过翻译一个字符串目录的过程:

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

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

因为只支持单一语言对一个翻译工具来说将是讽刺,所以我们支持更改您的配置语言。您可以通过运行以下命令设置您的语言:

tranzlate set-language <语言>

其中<语言>为以下选项之一:

例如,如果你想切换到简体中文,你可以通过设置LANGUAGE值为zh-Hans来实现:

tranzlate set-language zh-Hans

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

支持Markdown翻译。要进入markdown模式,运行:

tranzlate markdown

您将被提示输入要翻译的markdown文件或glob。输出翻译在每个文件名称的末尾附加ISO语言代码。**例如,**如果你将README.md翻译成简体中文 (zh-Hans),输出文件将为README.zh-Hans.md

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

注意:Markdown翻译目前处于测试阶段。请报告您遇到的任何问题。

429错误

一些用户报告了来自OpenAI的429错误。这是由于错误的计费设置或过度使用配额。请按照此指南修复。

您可以在此链接激活计费。请确保添加了付款方式,除非您正在接受OpenAI的活动资助。

我不是语言专家。我的翻译能力只达到了中学级别的西班牙语。然而,我相信软件的重要性。软件的开发对象影响着软件。本地化不应该是也从不应该是一种附带思考的事务。通过利用AI 翻译工具,可以在产品开发的早期阶段就开始讨论软件对不同社区的影响,而不是晚期。

加速关于软件影响的讨论会在功能集锁定之前带来有意义的变化。这就是为什么我相信尽管不完美,但AI 翻译工具的力量。不要让完美成为我们取得进步的障碍。

易于翻译,字符串目录,希望有更多文件格式在未来供我创建_tranzlate_使用。

如果你想帮忙修复一些问题中的错误或实现一些功能,欢迎如此。对我来说,Swift的开发相对较新,所以我非常欢迎社区的反馈。

Alt

感谢ai-shell的README模板,在此模板的基础上我创建了这个文档。