fix(admin): unbreak ci:check on PR2b (TS2454 + missing fr translation) #237

Merged
julien merged 1 commits from fix/pr2b-build-errors into main 2026-05-26 16:18:12 +02:00
2 changed files with 13 additions and 1 deletions
Showing only changes of commit adb4d35274 - Show all commits
@@ -21,6 +21,10 @@
<source>Users — APF Portal Admin</source>
<target>Utilisateurs — Administration APF Portal</target>
</trans-unit>
<trans-unit id="route.user-scopes.title" datatype="html">
<source>User scopes — APF Portal Admin</source>
<target>Périmètres utilisateur — Administration APF Portal</target>
</trans-unit>
<trans-unit id="route.profile.title" datatype="html">
<source>Profile — APF Portal Admin</source>
<target>Profil — Administration APF Portal</target>
@@ -194,7 +194,15 @@ export class UserScopesService {
// ADR-0026 PR 1's "no FK on UserScope.value" rationale lets the
// value persist even after the target is decommissioned, so we
// validate only at the write path.
let exists: boolean;
//
// Initialise `exists = false` so TypeScript sees it as definitely
// assigned regardless of how the switch lands (the type-system
// can't see that `VALUE_BEARING_KINDS.has` already narrowed
// `kind` to the three branches). If somehow a non-value-bearing
// kind reached this code, the false default makes the next `if`
// throw with the same friendly "does not match" message — safe
// by construction.
let exists = false;
switch (kind) {
case 'etablissement':
exists =