guess_mime. Internal helper function. This docstring was added automatically to improve maintainability. Args: filename: Parameter. Returns: Varies.
(filename: str)
| 3134 | m: Parameter. |
| 3135 | |
| 3136 | Returns: |
| 3137 | Varies. |
| 3138 | """ |
| 3139 | _msg_store.append(m.group(2)) |
| 3140 | return m.group(1) + f"__MSG_{len(_msg_store)-1}__" + m.group(3) |
| 3141 | body = re.sub(r'(<span\s+class="msg-text"[^>]*>)([\s\S]*?)(</span>)', _msg_hold, body) |
| 3142 | |
| 3143 | |
| 3144 | # Protect brand/title/logo + special buttons from translation. |
| 3145 | # We protect by placeholdering the exact rendered text nodes. |
| 3146 | body = body.replace(">Theme<", ">__THEME_BTN__<") |
| 3147 | # Language toggle shows the *target* language: |
| 3148 | # English UI -> 'Ελληνικά' |
| 3149 | # Greek UI -> 'English' |
| 3150 | body = body.replace(">English<", ">__LANG_TARGET_EN__<") |
| 3151 | body = body.replace(">Ελληνικά<", ">__LANG_TARGET_EL__<") |
| 3152 | body = body.replace(">ButSystem<", ">__BRAND__<") |
| 3153 |
no outgoing calls
no test coverage detected