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-quick-i18n

v0.4.9

Published

quick i18n plugin for vue developer

Downloads

9

Readme

Vue i18n

✨ 快速开始

vue-quick-i18n

例子

现有项目国际化非常的繁琐:

  1. 将所有出现的要国际化的汉字复制取名配置
  2. 在 vue/js 文件中找到汉字位置,区分是在template中标签的label或者其他property中,或者{{}}script,又或者script中的,手动将一层一层的国际化 key 拷贝,粘贴。
  3. 就算是相同的汉子,由于在 vue 中的语法不同,需要重复的拷贝,粘贴
  4. 碰到一堆汉字拼接的简直要了老命/(ㄒ o ㄒ)/~~

设计

feature

插件功能

  1. 检测 vue/js 中的需要国际化的汉字,自动生成 json 文件
  2. 根据 json 文件检测 vue/js,检测汉字,自动替换成步骤 1 生成的 json 的 key
  3. 检测 vue/js 文件中的已替换的 key,展示对应汉字提示弹窗
  4. xxx.json 文件中,生成扁平化的 locales 的 xxx_flat.json 文件,方便取值复制
  5. 在 vue/js 中提供,提供 t,tt,ttt 代码提示

TODO

  • [x] 国际化 json 文件名可配置
  • [x] 悬浮展示 i18n value,跳转 json 文件
  • [x] 通过项目配置文件获取配置 settings,其中项目配置文件优先级最高(richierc.json)
  • [x] 增加 puidType 配置,默认使用short类型(12 位),提供long类型(24 位),生成唯一 key
  • [x] 使用 JSON AST 代替 RegExp 优化跳转体验
  • [ ] 增加 webview 展示替换更新等提醒界面
  • [ ] 支持 JS I18n 文件写入与读取