63 lines
1.8 KiB
Python
63 lines
1.8 KiB
Python
"""Тексты сообщений и рендер тегов.
|
|
|
|
Тексты сгруппированы по темам. ``TEMPLATES`` — реестр «ключ -> текст по
|
|
умолчанию» для засева таблицы ``message_templates`` (см. Блок 4).
|
|
"""
|
|
|
|
from common.texts import economy, info, notifications, shop, system, welcome
|
|
from common.texts.render import (
|
|
MAX_MESSAGE_LENGTH,
|
|
RAW_TAGS,
|
|
SUPPORTED_TAGS,
|
|
TAG_REGISTRY,
|
|
TemplateError,
|
|
format_tops,
|
|
format_user_list,
|
|
format_usernames,
|
|
render,
|
|
validate,
|
|
)
|
|
|
|
#: Реестр шаблонов по умолчанию.
|
|
TEMPLATES: dict[str, str] = {
|
|
"welcome.text": welcome.MSG_WELCOME_TEXT,
|
|
"welcome.text2": welcome.MSG_WELCOME_TEXT2,
|
|
"welcome.text3": welcome.MSG_WELCOME_TEXT3,
|
|
"info.profile": info.MSG_INFO,
|
|
"info.help": info.MSG_HELP,
|
|
"shop.main": shop.MSG_SHOP_MAIN,
|
|
"shop.title": shop.MSG_SHOP_TITLE,
|
|
"shop.donat": shop.MSG_SHOP_DONAT,
|
|
"economy.nick_list": economy.MSG_NICK_LIST,
|
|
"economy.top": economy.MSG_TOP,
|
|
"economy.purification": economy.MSG_PURIFICATION,
|
|
"economy.no_purification": economy.MSG_NO_PURIFICATION,
|
|
"economy.eggs": economy.MSG_EGGS,
|
|
"economy.no_eggs": economy.MSG_NO_EGGS,
|
|
"notify.blago_30": notifications.MSG_BLAGO_30,
|
|
"notify.blago_45": notifications.MSG_BLAGO_45,
|
|
"notify.blago_55": notifications.MSG_BLAGO_55,
|
|
"notify.blago": notifications.MSG_BLAGO,
|
|
"notify.vklad": notifications.MSG_VKLAD,
|
|
}
|
|
|
|
__all__ = [
|
|
"MAX_MESSAGE_LENGTH",
|
|
"RAW_TAGS",
|
|
"SUPPORTED_TAGS",
|
|
"TAG_REGISTRY",
|
|
"TEMPLATES",
|
|
"TemplateError",
|
|
"economy",
|
|
"format_tops",
|
|
"format_user_list",
|
|
"format_usernames",
|
|
"info",
|
|
"notifications",
|
|
"render",
|
|
"shop",
|
|
"system",
|
|
"validate",
|
|
"welcome",
|
|
]
|