Files
TREK/shared/src/i18n/zh/trip.ts
T
Maurice 45f1ff7799 feat(planner): public transit routing via Transitous (#1065)
Each day header gets a transit button (replacing the rename pencil, which
moved next to the day name in the day detail panel). It opens a route search
backed by Transitous/MOTIS — free, open data, no paid provider: from/to stop
search with the day's own places as quick picks, depart/arrive time, mode
filters (train, subway, tram, bus, ferry, cable car) and ranking by best
route, fewer transfers or less walking. Results show local times, duration,
transfers, walking time and line badges in their official colors, with a
stop-by-stop breakdown per connection.

Adding a connection saves it as a regular transport reservation — typed by
its dominant leg, timed from the itinerary's wall-clock departure/arrival
converted to station-local time (tz-lookup), with the origin, transfer stops
and destination as endpoints and the compact legs in metadata.transit. It
slots into the day timeline by time and inherits editing, deletion and
drag-reordering from the existing transport machinery; the transport detail
view renders the full itinerary. Re-saving a transit transport through the
edit modal preserves the stored itinerary while the route is unchanged.

The server proxies the Transitous API (JWT-guarded, rate-limited, identifying
User-Agent, short response cache, strict mode whitelist); TRANSIT_API_URL
lets self-hosters use their own MOTIS instance. New i18n keys in every
locale, wiki page updated.

Discussion #1065
2026-07-03 15:06:31 +02:00

74 lines
3.0 KiB
TypeScript

import type { TranslationStrings } from '../types';
const trip: TranslationStrings = {
'trip.tabs.plan': '计划',
'trip.tabs.transports': '交通',
'trip.tabs.reservations': '预订',
'trip.tabs.reservationsShort': '预订',
'trip.tabs.packing': '行李清单',
'trip.tabs.packingShort': '行李',
'trip.tabs.lists': '列表',
'trip.tabs.listsShort': '列表',
'trip.tabs.budget': 'Costs',
'trip.tabs.files': '文件',
'trip.loading': '加载旅行中...',
'trip.loadingPhotos': '正在加载地点照片...',
'trip.mobilePlan': '计划',
'trip.mobilePlaces': '地点',
'trip.toast.placeUpdated': '地点已更新',
'trip.toast.placeAdded': '地点已添加',
'trip.toast.placeDeleted': '地点已删除',
'trip.toast.selectDay': '请先选择一天',
'trip.toast.assignedToDay': '地点已分配到当天',
'trip.toast.reorderError': '排序失败',
'trip.toast.reservationUpdated': '预订已更新',
'trip.toast.reservationAdded': '预订已添加',
'trip.toast.deleted': '已删除',
'trip.confirm.deletePlace': '确定要删除这个地点吗?',
'trip.confirm.deletePlaces': '删除 {count} 个地点?',
'trip.toast.placesDeleted': '已删除 {count} 个地点',
'trip.invite.linkTitle': '行程邀请链接',
'trip.invite.linkHint': '任何拥有 TREK 账户的人打开此链接都会以成员身份加入行程。重新生成可使旧链接失效。',
'trip.invite.create': '创建邀请链接',
'trip.invite.regenerate': '重新生成',
'trip.invite.disable': '停用',
'trip.invite.joinHeading': '加入此行程',
'trip.invite.joinPrompt': '您已被邀请加入"{title}"。',
'trip.invite.joinCta': '加入行程',
'trip.invite.joining': '加入中…',
'trip.invite.invalidTitle': '邀请不可用',
'trip.invite.invalid': '此邀请链接无效或已过期。',
'trip.invite.backToDashboard': '返回仪表盘',
'transit.title': '公共交通',
'transit.from': '出发地',
'transit.to': '目的地',
'transit.searchStop': '搜索站点或车站…',
'transit.swap': '交换',
'transit.depart': '出发',
'transit.arrive': '到达',
'transit.mode.rail': '火车',
'transit.mode.subway': '地铁',
'transit.mode.tram': '有轨电车',
'transit.mode.bus': '公交车',
'transit.mode.ferry': '渡轮',
'transit.mode.cable': '缆车',
'transit.pref.best': '最佳路线',
'transit.pref.transfers': '减少换乘',
'transit.pref.walking': '减少步行',
'transit.search': '搜索',
'transit.searching': '搜索中…',
'transit.searchError': '路线搜索失败,请重试。',
'transit.noResults': '未找到线路,请尝试其他时间或筛选条件。',
'transit.direct': '直达',
'transit.transfers': '换乘 {count} 次',
'transit.min': '{count} 分钟',
'transit.stops': '{count} 站',
'transit.walkTo': '步行至 {name}',
'transit.platform': '{track} 站台',
'transit.adding': '添加中…',
'transit.addToDay': '添加到当天',
'transit.itinerary': '行程',
'transit.attribution': '路线数据来自',
};
export default trip;