Giter VIP home page Giter VIP logo

lingascript's Introduction

  • The Mobile/Web Engineer and the Tech writer
  • Check my 🎩 resume and 🖋 blog

lingascript's People

Contributors

gasolin avatar nobodxbodon avatar testacount1 avatar zaoqi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lingascript's Issues

support twjs / cnjs subfix

Related Package (please complete the following information):

  • Package lingascript-tw/lingascript-cn

Is your feature request related to a problem? Please describe.

need separate subfix to support syntax highlight correctly, or the editor will show errors

Describe the solution you'd like

support twjs / cnjs subfix

Additional context

Some user experice sharing in #19

transpile ts(en) to ts(cn)

2-way conversion is useful to make sure the conversion is right

this might not possible since transpile ts(en) to js will lose some context

alias for build-in type methods

["a", "b", "c"].length can be written as ["a", "b", "c"].长度

Should work In Example:

EN:

let strLength2: number = (someValue2 as string).length;

CN:

变量 strLength2: 数字 = (someValue2 转为 文字).长度;

wrap keyword matching code to functions

current patch use XXX == 'keyword' || XXX == 'trans_keyword' inline to support different languages

could be replaced by a set of isKeyword[Keyword] function and wrap the matching detail inside of the function

ex, instead of XXX == 'Symbol' || XXX == '中文'

replace to isKeyword(XXX)

and define function

function isKeywordSymbol(value) {
  return value == 'Symbol' || value == '中文' 
}

The change could be proposed to TypeScript for maintainability.

By replacing the isKeyword[Keyword] functions, LingaScript could even support parse multi-native-language keywords in the same compiler

issue with package.json sample in readme

Followed steps here, and ./node_modules/bin/tsc doesn't work for me. I change it to ./node_modules/lingascript-cn/bin/tsc to successfully run npm run compile. I wonder if this change is indeed necessary or I missed something during the setup? I'll create a draft PR including this.

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.