Files
TREK/shared/src/i18n/zh/map.ts
T
Maurice e28bd2fc99 fix(maps): draw with Leaflet wherever WebGL2 is missing
MapLibre 6 and Mapbox GL 3 both throw out of their Map constructor without
WebGL2. Every place that builds a GL map now asks one helper first,
components/Map/glSupport.ts, and a browser without WebGL2 gets the Leaflet
map with the user's tiles instead of a map that fails to start:

- the trip map (MapViewAuto) and the journey maps (JourneyMapAuto) pick
  their renderer through useGlRenderer, which folds in the Mapbox token
  rule they each had;
- the settings preview, desktop and phone, shows the Leaflet preview
  through useMapSettingsForm and says why under it;
- the tour planner keeps the 2D map when 3D is asked for and says that
  3D needs WebGL2;
- the PDF route map and the Leaflet vector basemap already fell back and
  now report a GPU failure too.

Behind the probe, buildGlMap wraps each constructor (MapViewGL,
JourneyMapGL, the settings preview, the terrain map, the PDF map). A GPU
that claims WebGL2 and still refuses the context is reported through
utils/webgl, which turns the answer to no and tells every mounted map,
so they switch to Leaflet without a reload; any other error is still
thrown. Two new strings, map.webgl2.fallback and map.webgl2.terrain, in
all 27 locales.
2026-10-24 22:41:56 +00:00

43 lines
2.1 KiB
TypeScript

import type { TranslationStrings } from '../types';
const map: TranslationStrings = {
'map.connections': '连接',
'map.showConnections': '显示预订路线',
'map.hideConnections': '隐藏预订路线',
'poi.searchThisArea': '搜索此区域',
'poi.cat.restaurants': '餐厅',
'poi.cat.cafes': '咖啡馆',
'poi.cat.bars': '酒吧与夜生活',
'poi.cat.hotels': '住宿',
'poi.cat.sights': '景点',
'poi.cat.museums': '博物馆与文化',
'poi.cat.nature': '自然与公园',
'poi.cat.activities': '活动',
'poi.pluginCategories': '来自插件的分类',
'map.showAllConnections': '显示所有预订路线',
'map.hideAllConnections': '隐藏所有预订路线',
'map.baseLayer.default': '地图',
'map.baseLayer.satellite': '卫星',
'map.baseLayer.hiking': '徒步',
'map.baseLayer.hikingDown': 'OpenHikingMap 当前无响应。请切换到其他地图,你的路线保持不变。',
'map.baseLayer.cycle': '骑行',
'map.baseLayer.cycleDown': 'CyclOSM 目前没有响应。请切换到其他地图,你的行程保持不变。',
'map.baseLayer.switchToSatellite': '切换到卫星视图',
'map.baseLayer.switchToDefault': '切换到地图视图',
'map.location.denied': '定位权限已被阻止。请检查设备设置,已安装的应用拥有与浏览器分开的定位权限。',
'map.location.unavailable': '无法确定你的位置。',
'map.location.timeout': '定位耗时过长。请在能看到天空的开阔位置重试。',
'map.overview.show': '显示整个行程',
'map.lock.lock': '锁定地图视图',
'map.lock.unlock': '让地图跟随所选内容',
'map.overview.hide': '隐藏整个行程',
'map.overview.total': '总距离',
'map.attribution': '地图来源',
'map.overview.unrouted': '有 {count} 段无法计算路线,因此距离不完整。',
'map.overview.dayUnrouted': '本日有 {count} 段无法计算路线',
'map.baseLayer.topo': '地形图',
'map.webgl2.fallback': '此浏览器不支持 GL 地图所需的 WebGL2,因此地图改用 Leaflet 显示。',
'map.webgl2.terrain': '3D 需要 WebGL2,而此浏览器不支持。地图保持 2D。',
};
export default map;