upgrade: adopt V8.33.1 — final merge, our patches upstreamed natively
V8.33.0 absorbed our entire platform patch set as native features (discovery/env_for macro override/blocks.css priority/type-mapping fix/ frontend entries/locale override) and synced trade-pro from our remote; V8.33.1 adds HESU PIPE industrial-theme home fixes (1.3.1). Zero patch re-application this round — all verified native. Theme suites 35/35; full run 428 passed + same 10 known Windows env fails (FAILED set unchanged). Live: container 8.33.1-dev.1 healthy, hesupipe 192 entries intact, trade-pro build 203 pages 0 errors. Patch registry retired to archive — future upgrades are plain overlay. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
+3
-2
@@ -97,7 +97,7 @@ def set_site_locale(site_id:str,data:LocaleIn,request:Request):
|
||||
enterprise.require(request,site_id,'owner')
|
||||
try:locale=locale_value(data.locale)
|
||||
except ValueError as exc:raise HTTPException(400,str(exc))
|
||||
site=db.one('SELECT settings_json FROM sites WHERE id=?',(site_id,))
|
||||
site=db.one('SELECT settings_json,theme FROM sites WHERE id=?',(site_id,))
|
||||
if not site:raise HTTPException(404,'网站不存在')
|
||||
settings=json.loads(site['settings_json'] or '{}')
|
||||
settings['locale']=locale
|
||||
@@ -195,12 +195,13 @@ def site_locale(site_id):
|
||||
row=db.one('SELECT locale FROM language_sites WHERE site_id=?',(site_id,))
|
||||
if row:return row['locale']
|
||||
# Per-site locale override (e.g. standalone English sites outside any language group)
|
||||
site=db.one('SELECT settings_json FROM sites WHERE id=?',(site_id,))
|
||||
site=db.one('SELECT settings_json,theme FROM sites WHERE id=?',(site_id,))
|
||||
try:override=json.loads(site['settings_json'] or '{}').get('locale') if site else None
|
||||
except ValueError:override=None
|
||||
if override:
|
||||
try:return locale_value(override)
|
||||
except ValueError:pass
|
||||
if site and site['theme']=='trade-pro':return 'en'
|
||||
return 'zh-CN'
|
||||
|
||||
def assert_build_safe(site_id):
|
||||
|
||||
Reference in New Issue
Block a user