Fix language reload: hasattr('mode') → hasattr('_mode'), val.mode → val._mode

BaseBridge stores mode as self._mode, not self.mode — so the reload
loop never found any bridges and language switching did nothing.
This commit is contained in:
2026-06-06 14:25:26 +02:00
parent 82d0939a18
commit 05a289dd65
+2 -2
View File
@@ -2261,9 +2261,9 @@ def _reload_all_panel_langs():
for key, val in list(sc.sticky.items()):
if (key.endswith("_bridge") or key.endswith("_bridge_ref")) \
and hasattr(val, "_wv") and val._wv is not None \
and hasattr(val, "mode"):
and hasattr(val, "_mode"):
try:
panel_base.load_inline(val._wv, val.mode)
panel_base.load_inline(val._wv, val._mode)
except Exception as ex:
print("[TOOLBAR] reload_lang ({}): {}".format(key, ex))
except Exception as ex: