Skip to content

v1.1.0 - Example Languages Expansion

Latest

Choose a tag to compare

@CalciumKing CalciumKing released this 25 Feb 01:39

This marks the second ever release of Translatable-Python

Purpose & Overview

In this stage, the core system for translating custom keywords from a csv dictionary into valid Python and executing the full program has been improved. Recursive functions, control flow, built-ins, and string handling are supported. Only slight modifications have been introduced since the last release, no major changes or bugs are known in this release.

Key Features

  1. Keywords Translated Via CSV
    • Users define mappings in a .csv file (e.g. if,whenever) and those are applied across the entire program.
  2. Control Flow Support
    • Keywords like if, while, try, def, etc. are all fully supported.
    • Recursion and return types for more advanced programs are operational.
  3. String Literal Detection
    • String-scanning logic exists so that programs do not translate keywords if they are within string literals.
    • The intention for this is to prevent translations for any string literals.
  4. Simple/Clear Architecture
    • Clean separation of concerns with functions
    • Plenty of documentation with single line comments and docstrings for functions
    • Function name abstraction (e.g.: translate_program, run_program)
    • Structured file hierarchy with possibility for expansion in example/
    • Compiler runs efficiently inside a <145 line Python file (lang.py).
  5. Resources Specified Through Command Line
    • Project is run via python lang.py script.tpy dict.csv format
    • Translatable script to be run is the first argument after lang.py
    • Dictionary to derive translations from is the second argument (New)
  6. Potential For Future Additions
    • Project is structured to dynamically translate keywords located in a .csv file
    • Users can modify said .csv with their own language or keywords and write their own programs in a dedicated folder inside examples/.

Languages

  • Russian
  • Thai
  • Korean
  • Standard Arabic
  • Hindi
  • Gen Alpha (English)

Contributors

Main changes

Language Example Contributors

For setup and usage instructions, see README.md.

Changelog:

v1.1.0 includes the following changes since v1.0.0:

  • More languages
  • An image of Russian Python in IDE
  • Slightly updated README.md
  • Dictionary path as command line argument
  • Some file renaming changes

Full Changelog: v1.0.0...v1.1.0