inexorabletash / jslogo

Logo in JavaScript
https://calormen.com/jslogo
Other
370 stars 148 forks source link

Localized TO & END replaced with English in Library #113

Open slodki opened 5 years ago

slodki commented 5 years ago
  1. Enter following code using localized Logo procedures/keywords (example in Polish Logo):
  2. Run above code - star is displayed
  3. Check History panel - verbatim copy of above code is displayed
  4. Check Library panel - following code is displayed:

    oto replaced with TO and już replaced with END. Localized and English commands are mixed together.

Original localized procedures are stored in Library except TO and END words hardcoded in LogoInterpreter.definition(): https://github.com/inexorabletash/jslogo/blob/8d56a623172d36bb9ffbb8192459a6c372206848/logo.js#L1182 https://github.com/inexorabletash/jslogo/blob/8d56a623172d36bb9ffbb8192459a6c372206848/logo.js#L1197

inexorabletash commented 5 years ago

Yeah... and with the localization scheme just being aliases (for TO at least) there's no good way to select the appropriate version.

It's probably easiest to stash the whole original input line somewhere and use that instead. PRs welcome.