A Rosetta Stone Constructor for Untranslated App Source

We occasionally get requests for help on this board where both the request and the app are entirely in a foreign (non-English) language.

Sample request:

This is what I encounter trying to read the code:


Both the Designer and the Blocks Editor offer no help for the cross language developer.

There might exist translator glasses or ways to strap your phone to your head to run a translator app, but I prefer a less hardware intensive approach.

So here is an app that can take the .bky and .scm file sources of a Screen (you have to unpack them from the aia file yourself), and extract all the important user text fragments, and run them through the Ai2 Translator component for safekeeping in a TinyDB instance for later review.

The app offers two ways to load the .bky and .scm files at run time:

  • download from a free file sharing service
  • import from the assets folder (I find this easier)

Input options:

The first row offers file selection from the assets folder.

The second and third rows allow for Web downloads of the .bky and .scm input files.

The last row allows for clearing or inspection of the translations TinyDB instance.

Here is the source aia, with a sample Screen pre-loaded into its assets (Media) folder:
Rosetta_blocks_translate.aia (60.7 KB)

The blocks:

Sample results:

2 Likes

Things I learned during development of the app:

  • The Ai2 Toggle Console facility is very handy.

  • Breaking down camel case variable names was a waste of effort, along with worrying about embedded underscores. The Ai2 translator facility actually benefitted from seeing such constructs. The only scrubbing I needed to do was to eliminate embedded numbers and non-alpha characters, to avoid duplication and waste of the Translator.

  • I already had a queueing mechanism in place from another translation project, to avoid machine gunning the Translator. Updating the List Picker .Text for the translation results after each translation acted as a handy progress indicator during the relatively slow translation process.

  • It's possible to isolate user text both from screen source (.scm text) and blocks text (.bky) by spotting the wrappers for the text.

1 Like