Step 2 (i18n): $localize sweep + JA_NEE dedup (M3, M4)
Wrap every user-facing Dutch string in Angular's first-party i18n — `i18n`/ `i18n-<attr>` in templates, `$localize` in TS (value-objects, machines, commands, label constants, shared-component defaults). Source locale stays nl; a second locale is now a translation file, not a code change. - M3: ~145 strings localized with stable @@ ids across registratie, herregistratie, auth, shared/ui, shared/layout. Skipped: showcase, debug-state, scenario interceptor, generated client, specs/stories, raw status enum tags, internal parse* diagnostics. - M4: single shared JA_NEE (localized labels) in radio-group; both wizard copies removed. Gate green: lint, check:tokens, build, test 77/77. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ export class DigidAdapter {
|
||||
// Swap for a real OIDC redirect flow when there's a backend.
|
||||
async authenticate(bsn: string): Promise<Result<string, Session>> {
|
||||
const t = bsn.trim();
|
||||
if (!/^\d{9}$/.test(t)) return err('Voer een geldig BSN van 9 cijfers in.');
|
||||
if (!/^\d{9}$/.test(t)) return err($localize`:@@validation.bsn:Voer een geldig BSN van 9 cijfers in.`);
|
||||
return ok({ bsn: t, naam: 'Dr. A. (Anna) de Vries' });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,15 +10,15 @@ import { ButtonComponent } from '@shared/ui/button/button.component';
|
||||
imports: [FormsModule, FormFieldComponent, TextInputComponent, ButtonComponent],
|
||||
template: `
|
||||
<form (ngSubmit)="submitted.emit(bsn)" class="app-form app-form-panel">
|
||||
<app-form-field label="BSN" fieldId="bsn" required description="9 cijfers (demo: vul iets in)">
|
||||
<app-form-field i18n-label="@@login.bsnLabel" label="BSN" fieldId="bsn" required i18n-description="@@login.bsnDescription" description="9 cijfers (demo: vul iets in)">
|
||||
<app-text-input inputId="bsn" [(ngModel)]="bsn" name="bsn" placeholder="123456789" />
|
||||
</app-form-field>
|
||||
|
||||
<app-form-field label="Wachtwoord" fieldId="pw" required>
|
||||
<app-form-field i18n-label="@@login.wachtwoordLabel" label="Wachtwoord" fieldId="pw" required>
|
||||
<app-text-input inputId="pw" type="password" [(ngModel)]="password" name="pw" />
|
||||
</app-form-field>
|
||||
|
||||
<app-button type="submit" variant="primary">Inloggen met DigiD</app-button>
|
||||
<app-button type="submit" variant="primary" i18n="@@login.submit">Inloggen met DigiD</app-button>
|
||||
</form>
|
||||
`,
|
||||
})
|
||||
|
||||
@@ -9,8 +9,8 @@ import { SessionStore } from '@auth/application/session.store';
|
||||
selector: 'app-login-page',
|
||||
imports: [PageShellComponent, AlertComponent, LoginFormComponent],
|
||||
template: `
|
||||
<app-page-shell heading="Inloggen" width="narrow"
|
||||
intro="Log in op uw persoonlijke BIG-register omgeving.">
|
||||
<app-page-shell i18n-heading="@@login.heading" heading="Inloggen" width="narrow"
|
||||
i18n-intro="@@login.intro" intro="Log in op uw persoonlijke BIG-register omgeving.">
|
||||
@if (error()) { <app-alert type="error">{{ error() }}</app-alert> }
|
||||
<app-login-form (submitted)="login($event)" />
|
||||
</app-page-shell>
|
||||
|
||||
Reference in New Issue
Block a user