From cbf669d3bd79b27a7879cb52f7af82328991e3f4 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 16 Jul 2022 22:06:38 +0200 Subject: [PATCH] Fixed base class of translation service --- src/cpl_translation/__init__.py | 4 ++-- src/cpl_translation/cpl-translation.json | 2 +- src/cpl_translation/translation_service_abc.py | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cpl_translation/__init__.py b/src/cpl_translation/__init__.py index d383c52a..d85bc096 100644 --- a/src/cpl_translation/__init__.py +++ b/src/cpl_translation/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_translation' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2022 sh-edraft.de' -__version__ = '2022.7.0.post1' +__version__ = '2022.7.0.post2' from collections import namedtuple @@ -51,4 +51,4 @@ init() # build-ignore-end VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='7', micro='0.post1') +version_info = VersionInfo(major='2022', minor='7', micro='0.post2') diff --git a/src/cpl_translation/cpl-translation.json b/src/cpl_translation/cpl-translation.json index 947a8a42..aed0aa4d 100644 --- a/src/cpl_translation/cpl-translation.json +++ b/src/cpl_translation/cpl-translation.json @@ -4,7 +4,7 @@ "Version": { "Major": "2022", "Minor": "7", - "Micro": "0.post1" + "Micro": "0.post2" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/src/cpl_translation/translation_service_abc.py b/src/cpl_translation/translation_service_abc.py index aeef3776..41950768 100644 --- a/src/cpl_translation/translation_service_abc.py +++ b/src/cpl_translation/translation_service_abc.py @@ -1,5 +1,7 @@ from abc import ABC, abstractmethod +from cpl_translation import TranslationSettings + class TranslationServiceABC(ABC): @@ -16,7 +18,7 @@ class TranslationServiceABC(ABC): def load(self, lang: str): pass @abstractmethod - def load_by_settings(self): pass + def load_by_settings(self, settings: TranslationSettings): pass @abstractmethod def translate(self, key: str) -> str: pass