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

@pyongchen/i18n-cli

v1.2.10

Published

```angular2html npm i @tencent/i18n-cli -D -g ```

Readme

安装

npm i @tencent/i18n-cli -D -g

项目配置

生成默认配置

i18n-cli init

腾讯文档

只支持微信登录

腾讯文档手动鉴权

  1. 发起授权,浏览器输入 https://docs.qq.com/oauth/v2/authorize?client_id=b477e838b4c24d0db4c399931332b48e&redirect_uri=https://docs.qq.com&response_type=code&scope=all&state=STATE
  2. 使用微信登录
  3. 获取 code,登录成功后,无需关注网页内容,直接查看跳转的网址中会携带 code,如:https://proxy.oasis.woa.com/?code=NDR8HIS3M0MPA5RK4PJYJA&state=STATE 所表示的 code=NDR8HIS3M0MPA5RK4PJYJA 注意 code 有效期为 5 分钟,故需要快速进行下一步
  4. 获取 token,浏览器输入 https://docs.qq.com/oauth/v2/token?client_id=b477e838b4c24d0db4c399931332b48e&client_secret=83DSgO7GZEHb4CA79OGpx7xywix0tCMI&redirect_uri=https://docs.qq.com&grant_type=authorization_code&code=${code}
  5. 把 access_token 和 user_id 填到 i18n.config.json TENCENT_DOC 配置中 AccessToken: access_token OpenId: user_id

提取词条, 提取到腾讯文档

i18n-cli push:onlineExcel -e [encodedID] -s [sheetID] -u -k [key]
必填参数

-e [encodedID] -s [sheetID]

example:
https://docs.qq.com/sheet/DAAAAAAAAAAAA?tab=BB0000
encodedID = DAAAAAAAAAAAA
sheetID = BB0000

i18n-cli push:onlineExcel -e "DAAAAAAAAAAAA" -s "BB0000" -k "testKey"
可选参数
  • -u, excel 中已存在的相同 key 的词条会被项目中的词条覆盖, 不填则只会提取出 excel 中没有的词条
  • -k [key], 如 -k "testWord",表示只提取包括这个 key 后面的词条,不填则全量导出

拉取词条, 从腾讯文档拉取词条

i18n-cli pull:onlineExcel -e [encodedID] -s [sheetID] -u -k [key]
必填参数

-e [encodedID] -s [sheetID]

example:
https://docs.qq.com/sheet/DAAAAAAAAAAAA?tab=BB0000
encodedID = DAAAAAAAAAAAA
sheetID = BB0000

i18n-cli pull:onlineExcel -e "DAAAAAAAAAAAA" -s "BB0000" -u
可选参数
  • -u, 已有的翻译会被覆盖更新,一般都加上
  • -k [key], 如 -k "testWord",表示只拉取包括这个 key 后面的词条,不填则全量拉取计算,如果 excel 表太大,可以加上减少遍历耗时

GPT3.5 自动翻译

翻译规则

  • 源语言,文档从左向右遍历,第一个有内容的列单元格作为源语言
  • GPT 翻译的内容会以黄色字体更新在文档上

example:
https://docs.qq.com/sheet/DAAAAAAAAAAAA?tab=BB0000
encodedID = DAAAAAAAAAAAA
sheetID = BB0000

 i18n-cli translate -e "DAAAAAAAAAAAA" -s "BB0000"

覆盖更新(以腾讯文档为准,整个文件会被覆盖)

 i18n-cli pull:replace -e DAAAAAAAAAAAA -s BB0000
# 使用精简翻译模式
i18n-cli translate -e <encodedID> -s <sheetID> --compact

# 或者使用短参数
i18n-cli translate -e <encodedID> -s <sheetID> -c
# 更新token
i18n-cli renew-token

配置参数 i18n.config.json

{
    TI18N_APP_ID: "xx", //T18n平台配置
    TI18N_APP_KEY: "xxx",
    TI18N_PROJECT_ID: "xxx",
    TI18N_MODULE_CODE: "default",
    TI18N_VERSION_CODE: "v1.0",
    TMT_SECRET_ID: "xxx", // 腾讯翻译配置
    TMT_SECRET_KEY: "xxx",
    "SUPPORT_NEST": false, //是否支持嵌套
    "TENCENT_DOC": { //腾讯文档配置
    "AccessToken": "xxx",
    "OpenId": "xxxx",
    "ClientId": "xxx"
    },
  "LOCAL_CONFIG": [ // 项目多语言文件配置
    {
      "lang": "zh",
      "path": "./src/locales/zh-CN.ts", //语言ts/js路径,用于babel遍历和写入,支持json格式
      "desc": "中文简体" // 语言描述
    },
    {
      "lang": "en",
      "path": "./src/locales/en-US.ts",
      "desc": "英文"
    }
  ]
}