mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-21 11:36:05 +00:00
f35b189ca2
A WidgetKit extension (TREKWidgets) with two parts: the next trip on the home screen, with a countdown before it starts and today's day and next stops while it runs, and a Live Activity for the travel day on the lock screen and in the Dynamic Island showing the next timed stop and the day's progress. The web app builds both from the trips stored offline on the device (native/widgets.ts) and hands them over through TrekShell (setWidgetSnapshot, syncTripDay, endTripDay). The texts are already translated, so the widget needs no localisation of its own. The snapshot lives in the keychain group the app shares with its extensions, so no App Group is needed. Taps open com.liketrek.trek://navigate/<path>. NativeWidgetsSync refreshes on start, on returning to the foreground and every quarter hour. Both parts are gated behind the widgets / liveActivity capabilities, so older binaries and the PWA are unaffected.
95 lines
5.2 KiB
TypeScript
95 lines
5.2 KiB
TypeScript
import type { TranslationStrings } from '../types';
|
|
|
|
const native: TranslationStrings = {
|
|
'native.connect.title': '连接到 TREK',
|
|
'native.connect.hint': '请输入你在浏览器中打开 TREK 时使用的地址。',
|
|
'native.connect.placeholder': 'https://trek.example.com',
|
|
'native.connect.submit': '连接',
|
|
'native.connect.checking': '正在检查…',
|
|
'native.connect.tryDemo': '试试演示版',
|
|
'native.connect.whatIsServer': '什么是 TREK 服务器?',
|
|
'native.connect.errorInvalid': '这看起来不像网址。',
|
|
'native.connect.errorUnreachable': '此地址没有服务器响应。请检查地址和网络连接。',
|
|
'native.connect.errorNotTrek': '此地址上的服务器不是 TREK。',
|
|
'native.connect.errorTooOld': '此 TREK 服务器版本过旧,无法用于应用。请先更新服务器。',
|
|
'native.offline.title': '无法连接服务器',
|
|
'native.offline.hint': 'TREK 无法连接到 {server}。请检查网络连接后重试。',
|
|
'native.offline.retry': '重试',
|
|
'native.changeServer': '更换服务器',
|
|
'native.login.failed': '登录未成功,请重试。',
|
|
'native.handoff.title': '在应用中继续',
|
|
'native.handoff.hint': '你已以 {name} 身份登录。请打开 TREK 应用,在那里完成登录。',
|
|
'native.handoff.open': '打开 TREK 应用',
|
|
'native.handoff.switchAccount': '使用其他账号',
|
|
'native.privacy': '隐私政策',
|
|
'native.settings.server': '服务器',
|
|
'native.settings.serverHint': '此应用已连接到 {server}。',
|
|
'native.welcome.headline': '你的旅行。\n你的计划。',
|
|
'native.welcome.sub': '实时协同规划:路线、预算、游记、相册书——搭配 AI。',
|
|
'native.welcome.connect': '连接你的 TREK',
|
|
'native.welcome.connectSub': '打开你已在使用的地址',
|
|
'native.welcome.getCloud': '获取 TREK Cloud',
|
|
'native.welcome.getCloudSub': '为你托管,无需搭建',
|
|
'native.cloud.title': 'TREK Cloud',
|
|
'native.cloud.sub': '我们为你托管 TREK,用你自己的地址。无需安装、无需维护,几分钟即可就绪。',
|
|
'native.cloud.f1': '你专属的地址,服务器位于德国',
|
|
'native.cloud.f2': '几分钟即可就绪,更新由我们负责',
|
|
'native.cloud.f3': '你的数据仍归你所有:没有广告,没有追踪',
|
|
'native.cloud.cta': '开始',
|
|
'native.cloud.haveServer': '我已经有 TREK 服务器了',
|
|
'native.connecting': '正在连接 {host}',
|
|
'native.back': '返回',
|
|
'native.plans.title': '选择方案',
|
|
'native.plans.sub': '用你自己的地址托管的 TREK。随时更改或取消。',
|
|
'native.plans.monthly': '按月',
|
|
'native.plans.yearly': '按年',
|
|
'native.plans.perMonth': '每月',
|
|
'native.plans.perYear': '每年',
|
|
'native.plans.aiDocs': '每月 {n} 份 AI 文档',
|
|
'native.plans.noAi': '无 AI 文档',
|
|
'native.plans.storage': '{n} GB 存储空间',
|
|
'native.plans.unlimited': '地点、行程和人数不限',
|
|
'native.plans.subscribe': '订阅',
|
|
'native.plans.loadError': '无法加载方案。请检查网络连接后重试。',
|
|
'native.plans.retry': '重试',
|
|
'native.plans.soon': '应用内订阅即将推出。目前请在网站上完成。',
|
|
'native.claim.title': '就快好了',
|
|
'native.claim.sub': '选择你的地址。我们会立即为你准备好。',
|
|
'native.claim.addressLabel': '你的地址',
|
|
'native.claim.taken': '该地址已被占用。',
|
|
'native.claim.invalid': '三个及以上的字母、数字和连字符。',
|
|
'native.claim.reserved': '该地址已被保留。',
|
|
'native.claim.free': '可用',
|
|
'native.claim.emailLabel': '邮箱',
|
|
'native.claim.emailHint': '用于你的账户和收据。',
|
|
'native.claim.subscribe': '以 {price} 订阅',
|
|
'native.claim.cancelled': '购买已取消。',
|
|
'native.claim.failed': '购买未成功。请重试。',
|
|
'native.claim.redeemFailed': '我们无法为你设置 TREK。请重试。',
|
|
'native.provisioning.title': '正在设置你的 TREK',
|
|
'native.provisioning.sub': '正在准备 {host}。只需一分钟。',
|
|
'native.provisioning.failedTitle': '即将就绪',
|
|
'native.provisioning.failedSub': '你的 TREK 正在路上。请稍后重试,或稍后打开应用。',
|
|
'native.provisioning.retry': '立即重试',
|
|
'native.update.title': '请更新 TREK 应用',
|
|
'native.update.body': '此服务器需要更新版本的应用才能正常使用全部功能。',
|
|
'native.update.open': '更新',
|
|
'native.lock.title': 'TREK 已锁定',
|
|
'native.lock.unlock': '解锁',
|
|
'native.lock.reason': '解锁 TREK',
|
|
'native.lock.settingTitle': '应用锁',
|
|
'native.lock.setting': '使用面容 ID 或密码锁定',
|
|
'native.lock.settingHint': '打开 TREK 时以及在后台停留半分钟后会要求验证,并在应用切换器中隐藏内容。',
|
|
'native.share.title': '导入到哪个行程?',
|
|
'native.share.noTrips': '还没有行程。请先创建一个,然后再次分享该文档。',
|
|
'native.widget.dayOf': '第 {n} 天,共 {m} 天',
|
|
'native.widget.today': '今天',
|
|
'native.widget.noTrip': '还没有计划中的行程',
|
|
'native.widget.inDays': '{n} 天后',
|
|
'native.widget.tomorrow': '明天',
|
|
'native.widget.nothingPlanned': '今天没有安排',
|
|
'native.widget.dayDone': '今天的行程已全部完成',
|
|
};
|
|
|
|
export default native;
|