mirror of
https://github.com/barkeser2002/srtranslator-bariskeser.git
synced 2026-09-25 05:49:58 +03:00
19 lines
320 B
Python
19 lines
320 B
Python
from abc import ABC, abstractmethod
|
|
|
|
|
|
class Translator(ABC):
|
|
max_char: int
|
|
|
|
@abstractmethod
|
|
def translate(
|
|
self, text: str, source_language: str, destination_language: str
|
|
) -> str:
|
|
...
|
|
|
|
def quit(self):
|
|
...
|
|
|
|
|
|
class TimeOutException(Exception):
|
|
"""Translation timed out"""
|