jaibascript
JavaScript en Español
Last updated 2 years ago by vasco3 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install jaibascript 
SYNC missed versions from official npm registry.

JaibaScript

JavaScript in Spanish

Overview

JaibaScript is a babel plugin that allows developers to write JavaScript code in spanish and JaibaScript will translate it into english.

This is the first step on making JavaScript a truly universal language.

JavaScript is a partial scripted language, like Mathematics and musical notations. However, it mixes symbols and reserved keywords.

For example, you have symbol notations such as AND and OR

if (a || b) {
  x = 3;
}

And you also have reserved keywords such as

function a(x) {
  return x;
}

Thanks to ES6/ES2015 now we can use symbol notations to declare a function:

var a = x => x; // looks more mathematical and english agnostic.

Having reserved keywords in english restrict JavaScript. Non-english speakers may find friction while learning it. This doesn't have to be the case for ES/JS APIs.

Would be very hard to remember all the symbol notations for hundreds of commands such as Math.random(). Therefor I propose translating the JS API into different spoken languages. JavaScript's first conception goal was to be beginner friendly. Replacing reserved keywords with more symbols, and translating the EcmaScript's APIs will make it more universal.

In the future this project could be forked into a generic tool that will enable the translation of JavaScript to other languages.

Requirements

  • NodeJS v6+
  • babel v6+

How to install

  • npm install --save jaibascript
  • Add jaibascript to the list of babel plugins

Usage

Browse the docs to see the translation of the commands. Then run you build babel build script. JaibaScript plugin will translate your code.

JaibaScript

Examples

const lista = [1,3,4];

lista.filtrar(num => num > 2);

// traducido a
lista.filter(num => num > 2);

References

Contributors

  • Jorge C. Cuadra F.

License

MIT

Current Tags

  • 1.2.0                                ...           latest (2 years ago)

3 Versions

  • 1.2.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 7
Dependencies (5)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |