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

vue-auto-translate

v1.1.13

Published

自动翻译插件

Downloads

13

Readme

vue-auto-translate

介绍
全自动化翻译插件,自动检测项目所有中文字体执行翻译,可指定翻译语言(多选),可指定翻译目录与输出目录 ,可选择谷歌或有道翻译
1.安装
npm install vue-auto-translate
2.安装完成后会在根目录生成配置文件 translate.json
{
    "translateModel": 1,    // 翻译模式:1 (i18n),2 (海豚格式)
    "strict": false,        // 是否严格模式,默认为false提取全局中文,为true时将只提取 $t(''). $L('') 内的中文
    "filePath": "./",       // 指定需要查询翻译的目录
    "targetPath": "",       // 指定翻译成功后输出的目录,为空时将自动查询,示列:"/src/i18n" ,'/resources/assets/js/language/language.js‘
    "languageList": [       // 指定需要翻译的语言列表 : CN,EN,TC,JA,KO .... 详见各翻译渠道的api文档
        "CN",
        "EN",
        "TC"
    ],
    "channel": "baidu",     // 翻译渠道:baidu 百度, youdao 有道, google 谷歌
    "appKey": "",           // 翻译渠道的应用key,google不需要
    "secretKey": "",        // 翻译渠道的应用密钥,google不需要
    "excludes": [           // 排除不需要翻译的目录
        "node_modules",
        "vendor",
        "build",
        "dist",
        ".git",
        ".vscode",
        "storage",
        "public",
        "language",
        "database",
        "lang",
        "i18n",
        ".svn"
    ],
    "fileSuffix": [        // 指定只翻译哪些后缀文件
        ".vue",
        ".html",
        ".js",
        ".ts",
        ".php"
    ]
}
3.执行翻译
npm run translate              //自动提取配置目录下所有中文进行翻译

npm run translate  -- '你好'    //只翻译单个输入文本