From 92f059f31361acd89bc6e93119aa9ec8e1c897d3 Mon Sep 17 00:00:00 2001 From: Maurice Date: Thu, 22 Oct 2026 13:31:00 +0200 Subject: [PATCH] fix(ci): the book engine's template names count as reached, and formatting --- client/scripts/i18n-keys.mjs | 15 ++++++++++----- server/src/nest/tours/hike-plan.helpers.ts | 6 +----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/client/scripts/i18n-keys.mjs b/client/scripts/i18n-keys.mjs index b991a9c00..e3d26ca08 100644 --- a/client/scripts/i18n-keys.mjs +++ b/client/scripts/i18n-keys.mjs @@ -44,7 +44,8 @@ * * The en keys nothing reaches are a ratchet. Besides src/, the search for * references reads server/src (system notice and notification channel keys - * the server sends, *Key properties in its registries) and plugin-sdk/src, so + * the server sends, *Key properties in its registries), plugin-sdk/src and + * shared/src/book (the Studio's layout template names), so * a key the server uses does not read as dead; those references only count as * reached, they are not held to the rules above. The unused keys per en * domain file may not rise above scripts/i18n-unused-baseline.json, and an @@ -69,11 +70,15 @@ const UNUSED_BASELINE = join(HERE, 'i18n-unused-baseline.json'); /** * Where else a translation key can be named: the server sends keys for the - * client to translate (system notices, notification channels), and the plugin - * SDK names the ones plugin surfaces use. Read only to find which en keys are - * reached. + * client to translate (system notices, notification channels), the plugin + * SDK names the ones plugin surfaces use, and the shared book engine names + * its layout templates. Read only to find which en keys are reached. */ -export const REFERENCE_ROOTS = [join(HERE, '..', '..', 'server', 'src'), join(HERE, '..', '..', 'plugin-sdk', 'src')]; +export const REFERENCE_ROOTS = [ + join(HERE, '..', '..', 'server', 'src'), + join(HERE, '..', '..', 'plugin-sdk', 'src'), + join(HERE, '..', '..', 'shared', 'src', 'book'), +]; /** How many en keys a template may reach and still pass without an entry below. */ export const MAX_IMPLICIT_MATCHES = 30; diff --git a/server/src/nest/tours/hike-plan.helpers.ts b/server/src/nest/tours/hike-plan.helpers.ts index c0550924c..37411e443 100644 --- a/server/src/nest/tours/hike-plan.helpers.ts +++ b/server/src/nest/tours/hike-plan.helpers.ts @@ -258,11 +258,7 @@ function runningTotals(legs: readonly number[]): number[] { } /** The walking minutes from the start to each point, the whole time split over the legs by the signposts' rule. */ -function waypointMinutesOf( - line: readonly GeometryPoint[], - positions: readonly number[], - total: number, -): number[] { +function waypointMinutesOf(line: readonly GeometryPoint[], positions: readonly number[], total: number): number[] { return runningTotals(legMinutes(line, positions, total)); }