GithubHelp home page GithubHelp logo

fanrito / vue-swift-i18n Goto Github PK

View Code? Open in Web Editor NEW

This project forked from richiechoo/vue-swift-i18n

0.0 0.0 0.0 44.58 MB

i18n vscode plugin for vue developer

License: MIT License

Shell 1.39% JavaScript 98.61%

vue-swift-i18n's Introduction

Vue i18n

✨ 快速开始

vue-swift-i18n

契子

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

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

设计

design.png

插件功能

  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

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

赞赏

如果插件给您带来便利,欢迎 star 或 赞赏哦 star或者好评我给你返现,加我好友吧!

vue-swift-i18n's People

Contributors

richiechoo avatar loki6855 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.