Giter Club home page Giter Club logo

auto-translate-converter's Issues

英文提取需求

如果你提取到的中文是在 i18n/zh-cn.js 中的,你就把对应的 i18n/en.js 中的也提取出来,当然替换的时候要把英文也给替换掉

新需求

开发目标

需求一

Before

// i18n/zh-cn.js
{ 'key': '中文' }
// i18n/en.js
{ 'key': 'English' }
// app.js
console.log(i18n('key'));
// other.js 硬编码的中文
console.log('中文'));

得到 excel

key Chinese English
random_key 中文 English

after

// i18n/zh-cn.js
{ 'key': medusa['random_key'] }
// i18n/en.js
{ 'key': medusa['random_key'] }
// app.js
console.log(i18n('key'));
// other.js 硬编码的中文
console.log(medusa['random_key']);

需求二

replace 时告知用户共扫描到X个中文,成功替换掉Y个中文,X不等于Y时,告警报错,并且退出,不进行最终的替换,然后将没有在 Excel 中查找到的中文输出到控制台上。

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.