figbert.com-gemini

[ACTIVE] the capsule and home of figbert in geminispace
git clone git://git.figbert.com/figbert.com-gemini.git
Log | Files | Refs | README

simply-translate.gmi (2271B)


      1 # SimplyTranslate
      2 
      3 SimplyTranslate is a collection of "translation scrapers with interfaces for gemini and the web," made by metalune.
      4 => gemini://metalune.xyz Check out metalune on their Gemini capsule!
      5 
      6 In other words, SimplyTranslate is a privacy-respecting front end for Google Translate, similar to Twitter's Nitter. Over the course of a couple days – and one synchronous hacking session – I containerized the program to make it easier to deploy on servers worldwide.
      7 
      8 When I first found the program, I immediately wanted to add it to my collection of self-hosted front ends. I had only one problem: I run my services with Docker, and SimplyTranslate had no Dockerfile. I tried slapping something together quickly, but curling from the container only threw an error:
      9 
     10 ```sh
     11 curl: (52) Empty reply from server
     12 ```
     13 
     14 I hopped onto the #simple-web IRC channel on Libera.Chat and started chatting with the devs. A couple days of back-and-forth later, we sat down to debug together. After scouring the internet, we determined that the application was binding to the wrong interface: 127.0.0.1, which is only accessible from the local machine, instead of 0.0.0.0, which is public.
     15 
     16 I cooked up a pair of working Dockerfiles – the first running the app directly and the second through uvicorn:
     17 => https://www.uvicorn.org a fast ASGI server for Python.
     18 
     19 Metalune made a repo for the Dockerfiles, and I sent in a patch via email. It was committed within the hour.
     20 
     21 => https://git.sr.ht/~metalune/simplytranslate_docker/ Check out the repo,
     22 => https://lists.sr.ht/~metalune/simplytranslate-devel/patches/23516 the patch I sent,
     23 => https://git.sr.ht/~metalune/simplytranslate_docker/commit/4fc34e3503def3a8436dab4f84a1731070a715ba and the commit itself.
     24 
     25 This contribution was particularly interesting! We collaborated over IRC and across timezones, and I ended up returning to git's roots by submitting the patch via git send-email. Compared to the GitHub workflow, this feels very natural!
     26 
     27 You can use SimplyTranslate over on metalune's hosted instance, either
     28 => https://translate.metalune.xyz/ on the web
     29 => gemini://translate.metalune.xyz/ or on Gemini.
     30 
     31 Also feel free to browse the source code
     32 => https://sr.ht/~metalune/SimplyTranslate/sources over on SourceHut.