Interactive translation in console


I try to make an interactive translation of games from one language to another in Termux. I used frotz and glulxe with translate-shell package. When I try:

frotz game.z5 | trans -b fr:ru


glulxe game.gblorb | trans -b fr:ru

the program just freezes.

Then I tried to check a pipe with tts application:

frotz game.z5 | termux-tts-speak

to speak output and it worked.

When I piped output to file (with tee) I discovered plenty of escape chars in it. Maybe it matter, maybe not.

Anybody know how to get plain text output that I could interactively pass to translator? Or maybe suggest some suitable console interpretator/translator?

I haven’t tried them myself, but there are minimalist/pure text I/O versions of frotz and glulxe which should probably work quite well for this use case.
For frotz, it’s the so-called “dumb” interface, and for glulxe, it’s a version compiled for using the “CheapGlk” library.

frotz: David Griffith / frotz · GitLab
description of dumb version: DUMB · master · David Griffith / frotz · GitLab
cheapglk: GitHub - erkyrath/cheapglk: Cheapass implementation of the Glk API
(the link title is taken automatically from the Github repo site title, “cheapass” is Zarf’s own description, not mine :slight_smile: )

I’m not sure if there are pre-compiled binaries available for the current versions, but I saw this older version: Release glulxe built with cheapglk and remglk - cheapglulxe, remglulxe · MikulasZelinka/glulxe · GitHub linked from this thread: Compiling Glulxe and Cheapglk in linux - #32 by myke.

Here’s also a link to a thread where someone describes a similar project: IF through Google Translate via command line


Many many thanks, StJohnLimbo! Didn’t know there were more minimalist versions of frotz and glulxe. The binaries are not suitable, because they are for PC, but on my android dumb frotz compiled successfully.

1 Like