22 lines
732 B
Python
22 lines
732 B
Python
|
#!/usr/bin/env python
|
||
|
# -*- coding: utf-8 -*-
|
||
|
|
||
|
if "LibreTranslatePlus" not in globals():
|
||
|
class LibreTranslatePlus:pass
|
||
|
|
||
|
class Anonymous: # LibreTranslatePlus.Abstracts.Base
|
||
|
|
||
|
def __init__(self, ltp):
|
||
|
self.ltp = ltp
|
||
|
self._print = self.ltp._print
|
||
|
self.validate = self.ltp.validate
|
||
|
self.exception = self.ltp.exception
|
||
|
if hasattr(self.ltp, "settings"):self.settings = self.ltp.settings.get
|
||
|
if hasattr(self.ltp, "i18n"):self.i18n = self.ltp.i18n.get
|
||
|
|
||
|
if not hasattr(LibreTranslatePlus, "Abstracts"):
|
||
|
class Subanonymous:pass
|
||
|
LibreTranslatePlus.Abstracts = Subanonymous
|
||
|
del globals()["Subanonymous"]
|
||
|
LibreTranslatePlus.Abstracts.Base = Anonymous
|
||
|
del globals()["Anonymous"]
|