Add multilingual audit CI pipeline + extract mandelblog_content_guard
This commit is contained in:
39
mandelblog_content_guard/agents/ru.py
Normal file
39
mandelblog_content_guard/agents/ru.py
Normal file
@@ -0,0 +1,39 @@
|
||||
from .base import BaseLanguageAgent
|
||||
from ..normalizers import normalize_ru_text
|
||||
from ..system_strings import build_contextual_system_vocabulary, build_system_vocabulary
|
||||
|
||||
|
||||
class RussianAgent(BaseLanguageAgent):
|
||||
locale = "ru"
|
||||
tone = "professional and confident"
|
||||
preferred_formality = "neutral polite"
|
||||
vocabulary_map = {
|
||||
**build_system_vocabulary(
|
||||
"ru",
|
||||
(
|
||||
"customization_integrations",
|
||||
"detailed_page_structure",
|
||||
"without_commitment",
|
||||
),
|
||||
),
|
||||
}
|
||||
_system_contextual = build_contextual_system_vocabulary("ru", ("plan_badge", "transparent_label"))
|
||||
contextual_vocabulary_map = {
|
||||
"badge": {**_system_contextual.get("badge", {})},
|
||||
"label": {**_system_contextual.get("label", {})},
|
||||
"metric": {**_system_contextual.get("metric", {})},
|
||||
"stat": {**_system_contextual.get("stat", {})},
|
||||
"rendered": {**_system_contextual.get("rendered", {})},
|
||||
}
|
||||
cta_defaults = {
|
||||
"starter": "Запланировать стартовую консультацию",
|
||||
"business": "Обсудить бизнес-проект",
|
||||
"support": "Посмотреть поддержку",
|
||||
"service": "Посмотреть услуги",
|
||||
"project": "Запустить свой проект",
|
||||
"contact": "Отправить запрос",
|
||||
"quote": "Получить предложение",
|
||||
}
|
||||
|
||||
def post_cleanup_text(self, text: str, field_path: str = "") -> str:
|
||||
return normalize_ru_text(text, field_path=field_path)
|
||||
Reference in New Issue
Block a user