Normalize fullwidth punctuation to ASCII across codebase.

Add scripts/normalize_ambiguous_unicode.py; fix corrupted patch_instance_theme_templates.py. Preserves curly quotes in string literals; removes Git homoglyph warnings on .env.example.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-08 23:42:26 +08:00
parent aaa72c7961
commit b733e551a0
392 changed files with 71522 additions and 71369 deletions
+7 -7
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""涓哄洓鎵€ templates 娉ㄥ叆 instance_theme 鑴氭湰/鏍峰紡涓庡垏鎹㈡寜閽€?""
#!/usr/bin/env python3
"""为四所 templates 注入 instance_theme 脚本/样式与切换按钮."""
from __future__ import annotations
from pathlib import Path
@@ -11,13 +11,13 @@ FILES = ("index.html", "login.html", "key_focus_v2.html", "order_focus_v2.html")
SCRIPT_TAG = ' <script src="/static/instance_theme.js?v=4"></script>\n'
CSS_LINK = ' <link rel="stylesheet" href="/static/instance_theme.css?v=4">\n'
THEME_TOGGLE = """ <div class="theme-toggle instance-theme-toggle" role="group" aria-label="鐣岄潰涓婚">
<button type="button" class="theme-toggle-btn is-active" data-theme-value="dark" aria-pressed="true" title="鏆楄壊涓婚">
THEME_TOGGLE = """ <div class="theme-toggle instance-theme-toggle" role="group" aria-label="界面主题">
<button type="button" class="theme-toggle-btn is-active" data-theme-value="dark" aria-pressed="true" title="暗色主题">
<svg class="theme-icon" viewBox="0 0 24 24" width="18" height="18" aria-hidden="true">
<path fill="currentColor" d="M12.1 3a9 9 0 1 0 8.9 11 6.5 6.5 0 1 1-8.9-11z"/>
</svg>
</button>
<button type="button" class="theme-toggle-btn" data-theme-value="light" aria-pressed="false" title="浜壊涓婚">
<button type="button" class="theme-toggle-btn" data-theme-value="light" aria-pressed="false" title="亮色主题">
<svg class="theme-icon" viewBox="0 0 24 24" width="18" height="18" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
<circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/>
</svg>
@@ -26,12 +26,12 @@ THEME_TOGGLE = """ <div class="theme-toggle instance-theme-toggle" role="
"""
INDEX_HEADER_OLD = """ <div class="header">
<h1>鍔犲瘑璐у竵锝滀氦鏄撶洃鎺?+ AI澶嶇洏涓浣撳寲</h1>
<h1>加密货币|交易监控 + AI复盘一体化</h1>
<div class="exchange-tag">{{ exchange_display }}</div>
</div>"""
INDEX_HEADER_NEW = """ <div class="header">
<h1>鍔犲瘑璐у竵锝滀氦鏄撶洃鎺?+ AI澶嶇洏涓浣撳寲</h1>
<h1>加密货币|交易监控 + AI复盘一体化</h1>
<div class="header-row">
<div class="exchange-tag">{{ exchange_display }}</div>
""" + THEME_TOGGLE + """ </div>