Add EN/Chinese language toggle for extract and transit names

Chinese strings live in web/data/extract-translations.zh-CN.json, keyed
by stable marker ID; the bottom-right control switches live-rendered
markers and tooltips and persists the choice in localStorage.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
lucioandClaude Fable 5 committed 2026-08-22 14:11:45 -07:00
1 parent f7cd4fde04
commit cf8f822e74
4 files changed
+247 -5

No files matched your search

+28
View File
@@ -610,6 +610,34 @@ html, body {
border-radius: 8px;
box-shadow: none !important;
}
.leaflet-bottom.leaflet-right {
display: flex;
flex-direction: column;
align-items: flex-end;
}
.leaflet-bottom.leaflet-right .leaflet-control { float: none; }
.leaflet-control-language { order: 1; }
.leaflet-control-zoom { order: 2; }
.leaflet-control-attribution { order: 3; }
.leaflet-control-language button {
min-width: 88px;
height: 32px;
padding: 0 10px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel);
color: var(--muted);
font: 12px/30px system-ui, "Microsoft YaHei UI", sans-serif;
cursor: pointer;
}
.leaflet-control-language button:hover { background: #2a303a; color: var(--text); }
.leaflet-control-language button strong { color: var(--accent); font-weight: 750; }
.leaflet-control-language button span + span,
.leaflet-control-language button span + strong,
.leaflet-control-language button strong + span { margin-left: 5px; }
.leaflet-control-zoom a,
.leaflet-touch .leaflet-control-zoom a {
width: 42px;