Add multilingual audit CI pipeline + extract mandelblog_content_guard
This commit is contained in:
25
mandelblog_content_guard/agents/__init__.py
Normal file
25
mandelblog_content_guard/agents/__init__.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from .base import BaseLanguageAgent
|
||||
from .de import GermanAgent
|
||||
from .en import EnglishAgent
|
||||
from .es import SpanishAgent
|
||||
from .fr import FrenchAgent
|
||||
from .it import ItalianAgent
|
||||
from .nl import DutchAgent
|
||||
from .pt import PortugueseAgent
|
||||
from .ru import RussianAgent
|
||||
|
||||
AGENT_REGISTRY = {
|
||||
"nl": DutchAgent,
|
||||
"en": EnglishAgent,
|
||||
"de": GermanAgent,
|
||||
"fr": FrenchAgent,
|
||||
"es": SpanishAgent,
|
||||
"it": ItalianAgent,
|
||||
"pt": PortugueseAgent,
|
||||
"ru": RussianAgent,
|
||||
}
|
||||
|
||||
|
||||
def get_language_agent(locale_code: str) -> BaseLanguageAgent:
|
||||
agent_class = AGENT_REGISTRY.get(locale_code, BaseLanguageAgent)
|
||||
return agent_class()
|
||||
Reference in New Issue
Block a user