mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 01:44:13 +00:00
chore(shared): format the ski schemas and the new CJK tours strings
This commit is contained in:
@@ -680,7 +680,8 @@ const admin: TranslationStrings = {
|
||||
'admin.toursCycleMap.subtitle':
|
||||
'ツアープランナーで自転車ツアーのベース地図として CyclOSM を提供します。OpenStreetMap France が適度な利用向けに配信しています。利用の多い、または商用のインストールでは無効にするか、事前に運営者と合意してください',
|
||||
'admin.toursSkiRouting.title': 'ゲレンデルーター',
|
||||
'admin.toursSkiRouting.subtitle': 'Places サーバーのゲレンデデータで、コース、リフト、トレイルに沿ってスキーツアーを計画します。オフにすると、スキーツアーの区間は直線で描かれます',
|
||||
'admin.toursSkiRouting.subtitle':
|
||||
'Places サーバーのゲレンデデータで、コース、リフト、トレイルに沿ってスキーツアーを計画します。オフにすると、スキーツアーの区間は直線で描かれます',
|
||||
'admin.addons.noAddons': '利用可能なアドオンはありません',
|
||||
'admin.weather.title': '天気データ',
|
||||
'admin.weather.badge': '2026年3月24日以降',
|
||||
|
||||
@@ -402,7 +402,8 @@ const tours: TranslationStrings = {
|
||||
'tours.ski.technique.unknown': '不明',
|
||||
'tours.ski.chooseDiscipline': 'スキーとして取り込むには種目を選んでください。',
|
||||
'tours.ski.chooseDisciplineToSave': '保存するには種目を選んでください。',
|
||||
'tours.ski.plannedHint': 'ゲレンデデータが届く範囲では OpenStreetMap のコース、リフト、トレイルに沿い、それ以外は直線で結びます。営業中かどうかはここでは示しません。',
|
||||
'tours.ski.plannedHint':
|
||||
'ゲレンデデータが届く範囲では OpenStreetMap のコース、リフト、トレイルに沿い、それ以外は直線で結びます。営業中かどうかはここでは示しません。',
|
||||
'tours.ski.options.maxDifficulty': '最も難しいコース',
|
||||
'tours.ski.options.priority': '優先',
|
||||
'tours.ski.options.pace': 'ペース',
|
||||
|
||||
@@ -678,7 +678,8 @@ const admin: TranslationStrings = {
|
||||
'admin.toursCycleMap.subtitle':
|
||||
'투어 플래너에서 자전거 투어의 기본 지도로 CyclOSM을 제공합니다. OpenStreetMap France가 적당한 사용을 위해 제공하며, 사용량이 많거나 상업적인 설치는 이를 끄거나 먼저 운영자와 합의합니다',
|
||||
'admin.toursSkiRouting.title': '슬로프 라우터',
|
||||
'admin.toursSkiRouting.subtitle': 'Places 서버의 슬로프 데이터로 슬로프, 리프트, 트레일을 따라 스키 투어를 계획합니다. 끄면 스키 투어 구간이 직선으로 그려집니다',
|
||||
'admin.toursSkiRouting.subtitle':
|
||||
'Places 서버의 슬로프 데이터로 슬로프, 리프트, 트레일을 따라 스키 투어를 계획합니다. 끄면 스키 투어 구간이 직선으로 그려집니다',
|
||||
'admin.addons.noAddons': '사용 가능한 애드온이 없습니다',
|
||||
'admin.weather.title': '날씨 데이터',
|
||||
'admin.weather.badge': '2026년 3월 24일부터',
|
||||
|
||||
@@ -652,7 +652,8 @@ const admin: TranslationStrings = {
|
||||
'admin.toursCycleMap.subtitle':
|
||||
'在行程規劃器中為騎乘提供 CyclOSM 作為底圖。OpenStreetMap France 為適度使用提供該地圖;使用量大或商業的安裝應關閉它,或先與營運方達成協議',
|
||||
'admin.toursSkiRouting.title': '雪道路線規劃器',
|
||||
'admin.toursSkiRouting.subtitle': '使用 Places 伺服器的雪道資料,沿雪道、纜車和越野雪道規劃滑雪路線。關閉後,滑雪路線的路段以直線繪製',
|
||||
'admin.toursSkiRouting.subtitle':
|
||||
'使用 Places 伺服器的雪道資料,沿雪道、纜車和越野雪道規劃滑雪路線。關閉後,滑雪路線的路段以直線繪製',
|
||||
'admin.addons.noAddons': '暫無可用擴充套件',
|
||||
'admin.weather.title': '天氣資料',
|
||||
'admin.weather.badge': '自 2026 年 3 月 24 日起',
|
||||
|
||||
@@ -376,7 +376,8 @@ const tours: TranslationStrings = {
|
||||
'tours.ski.technique.unknown': '未知',
|
||||
'tours.ski.chooseDiscipline': '請選擇項目,以便將軌跡匯入為滑雪。',
|
||||
'tours.ski.chooseDisciplineToSave': '請選擇項目以儲存路線。',
|
||||
'tours.ski.plannedHint': '在雪道資料涵蓋的地方,路段沿 OpenStreetMap 的雪道、纜車和越野雪道前進,其餘地方走直線。這裡不表示它們是否開放。',
|
||||
'tours.ski.plannedHint':
|
||||
'在雪道資料涵蓋的地方,路段沿 OpenStreetMap 的雪道、纜車和越野雪道前進,其餘地方走直線。這裡不表示它們是否開放。',
|
||||
'tours.ski.options.maxDifficulty': '最難的雪道',
|
||||
'tours.ski.options.priority': '優先',
|
||||
'tours.ski.options.pace': '節奏',
|
||||
@@ -461,7 +462,8 @@ const tours: TranslationStrings = {
|
||||
'tours.ski.time': '滑雪時間',
|
||||
'tours.ski.timeUnknown': '未計算',
|
||||
'tours.ski.timeInfoLabel': '滑雪時間如何計算',
|
||||
'tours.ski.timeInfo': '雪道路線規劃器依你的項目和節奏,加總在雪道上、纜車上、底站等候和步行的時間。只有每個路段都規劃好後才給出時間。如需總時長,請自行填寫。',
|
||||
'tours.ski.timeInfo':
|
||||
'雪道路線規劃器依你的項目和節奏,加總在雪道上、纜車上、底站等候和步行的時間。只有每個路段都規劃好後才給出時間。如需總時長,請自行填寫。',
|
||||
'tours.ski.classifyTitle': '為滑雪軌跡分類',
|
||||
'tours.ski.saved': '分類已儲存',
|
||||
'tours.ski.saveFailed': '無法儲存分類。',
|
||||
|
||||
@@ -602,7 +602,8 @@ const admin: TranslationStrings = {
|
||||
'admin.toursCycleMap.subtitle':
|
||||
'在行程规划器中为骑行提供 CyclOSM 作为底图。OpenStreetMap France 为适度使用提供该地图;使用量大或商业的安装应关闭它,或先与运营方达成协议',
|
||||
'admin.toursSkiRouting.title': '雪道路线规划器',
|
||||
'admin.toursSkiRouting.subtitle': '使用 Places 服务器的雪道数据,沿雪道、缆车和越野雪道规划滑雪路线。关闭后,滑雪路线的路段以直线绘制',
|
||||
'admin.toursSkiRouting.subtitle':
|
||||
'使用 Places 服务器的雪道数据,沿雪道、缆车和越野雪道规划滑雪路线。关闭后,滑雪路线的路段以直线绘制',
|
||||
'admin.addons.noAddons': '暂无可用扩展',
|
||||
'admin.weather.title': '天气数据',
|
||||
'admin.weather.badge': '自 2026 年 3 月 24 日起',
|
||||
|
||||
@@ -377,7 +377,8 @@ const tours: TranslationStrings = {
|
||||
'tours.ski.technique.unknown': '未知',
|
||||
'tours.ski.chooseDiscipline': '请选择项目,以便将轨迹导入为滑雪。',
|
||||
'tours.ski.chooseDisciplineToSave': '请选择项目以保存路线。',
|
||||
'tours.ski.plannedHint': '在雪道数据覆盖的地方,路段沿 OpenStreetMap 的雪道、缆车和越野雪道行进,其余地方走直线。这里不表示它们是否开放。',
|
||||
'tours.ski.plannedHint':
|
||||
'在雪道数据覆盖的地方,路段沿 OpenStreetMap 的雪道、缆车和越野雪道行进,其余地方走直线。这里不表示它们是否开放。',
|
||||
'tours.ski.options.maxDifficulty': '最难的雪道',
|
||||
'tours.ski.options.priority': '优先',
|
||||
'tours.ski.options.pace': '节奏',
|
||||
@@ -462,7 +463,8 @@ const tours: TranslationStrings = {
|
||||
'tours.ski.time': '滑雪用时',
|
||||
'tours.ski.timeUnknown': '未计算',
|
||||
'tours.ski.timeInfoLabel': '滑雪时间如何计算',
|
||||
'tours.ski.timeInfo': '雪道路线规划器按你的项目和节奏,累加在雪道上、缆车上、底站等候和步行的时间。只有每个路段都规划好后才给出时间。如需总时长,请自行填写。',
|
||||
'tours.ski.timeInfo':
|
||||
'雪道路线规划器按你的项目和节奏,累加在雪道上、缆车上、底站等候和步行的时间。只有每个路段都规划好后才给出时间。如需总时长,请自行填写。',
|
||||
'tours.ski.classifyTitle': '为滑雪轨迹分类',
|
||||
'tours.ski.saved': '分类已保存',
|
||||
'tours.ski.saveFailed': '无法保存分类。',
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
SKI_DIFFICULTIES,
|
||||
skiDisciplineSchema,
|
||||
skiRouteOptionsSchema,
|
||||
skiTechniqueSchema,
|
||||
} from '../tours/ski.schema';
|
||||
import { SKI_DIFFICULTIES, skiDisciplineSchema, skiRouteOptionsSchema, skiTechniqueSchema } from '../tours/ski.schema';
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
@@ -256,7 +251,10 @@ export const skiAreaNearResponseSchema = z.object({
|
||||
export type SkiAreaNearResponse = z.infer<typeof skiAreaNearResponseSchema>;
|
||||
|
||||
/** An area id as the Places host spells it: `w:<way>` or `r:<relation>`, a piece of a split network with a suffix. */
|
||||
export const skiAreaIdSchema = z.string().max(64).regex(/^[a-z]:[0-9]+(-[0-9a-z]+)?$/);
|
||||
export const skiAreaIdSchema = z
|
||||
.string()
|
||||
.max(64)
|
||||
.regex(/^[a-z]:[0-9]+(-[0-9a-z]+)?$/);
|
||||
|
||||
/** One drawn line of an area's network: a run, a lift or a trail, as a Google-encoded polyline (precision 5). */
|
||||
export const skiNetworkFeatureSchema = z.object({
|
||||
|
||||
@@ -47,7 +47,10 @@ export const winterAreaCountsSchema = z.object({
|
||||
export type WinterAreaCounts = z.infer<typeof winterAreaCountsSchema>;
|
||||
|
||||
export const winterIndexRowSchema = z.object({
|
||||
id: z.string().max(64).regex(/^[a-z]:[0-9]+(-[0-9a-z]+)?$/),
|
||||
id: z
|
||||
.string()
|
||||
.max(64)
|
||||
.regex(/^[a-z]:[0-9]+(-[0-9a-z]+)?$/),
|
||||
name: z.string().nullable(),
|
||||
kind: z.string(),
|
||||
country: z.string().nullable(),
|
||||
|
||||
@@ -193,7 +193,12 @@ describe('ski and winter tours (SKI-02)', () => {
|
||||
it('SKI-SCHEMA-010: names the options each discipline reads, the downhill ones for skis and boards alike', () => {
|
||||
expect(skiOptionsReadBy('alpine')).toEqual(skiOptionsReadBy('snowboard'));
|
||||
expect(skiOptionsReadBy('alpine')).toContain('pace');
|
||||
expect(skiOptionsReadBy('cross_country')).toEqual(['groomed_only', 'lit_only', 'use_lifts', 'avoid_inferred_links']);
|
||||
expect(skiOptionsReadBy('cross_country')).toEqual([
|
||||
'groomed_only',
|
||||
'lit_only',
|
||||
'use_lifts',
|
||||
'avoid_inferred_links',
|
||||
]);
|
||||
expect(skiOptionsReadBy('touring')).toContain('touring_uphill_on_pistes');
|
||||
expect(skiOptionsReadBy('snowshoe')).not.toContain('max_difficulty');
|
||||
});
|
||||
|
||||
@@ -178,4 +178,9 @@ export function skiOptionsForDiscipline(discipline: SkiDiscipline, options: SkiR
|
||||
export const skiPlannedLegsSchema = z.array(z.number().int().nonnegative()).max(5000);
|
||||
|
||||
/** The name of a piste data build a ski tour's legs were planned on, as the Places host names it. */
|
||||
export const skiRouteBuildSchema = z.string().trim().min(1).max(40).regex(/^[0-9A-Za-z._-]+$/);
|
||||
export const skiRouteBuildSchema = z
|
||||
.string()
|
||||
.trim()
|
||||
.min(1)
|
||||
.max(40)
|
||||
.regex(/^[0-9A-Za-z._-]+$/);
|
||||
|
||||
Reference in New Issue
Block a user