MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / _msg_hold

Function _msg_hold

Scripts/ButSystem.py:2996–3010  ·  view source on GitHub ↗

_msg_hold. Internal helper function. This docstring was expanded to make future maintenance easier. Args: m: Parameter. Returns: Varies.

(m)

Source from the content-addressed store, hash-verified

2994 return ">" + out + "<"
2995
2996 return _TEXT_NODE_RE.sub(repl, body)
2997
2998# --- Attribute translation (title/placeholder/aria-label) ---------------------
2999# The HTML text-node translator does not touch attributes. That caused mixed EN/EL
3000# tooltips/placeholders (e.g., delivery ticks) in Greek mode.
3001_ATTR_RE = re.compile(r'\b(title|aria-label|placeholder|data-bs-original-title|data-bs-title|data-open|data-closed|alt)="([^"]*)"')
3002
3003def _translate_common_attributes(body: str, lang: str) -> str:
3004 """Translate common UI attributes in rendered HTML (best-effort).
3005
3006 We only touch a small, safe set of attributes:
3007 - title
3008 - aria-label
3009 - placeholder
3010
3011 We intentionally skip values that contain 'ButSystem' to keep
3012 the brand label unchanged.
3013 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected