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>
30 lines
1.3 KiB
TypeScript
30 lines
1.3 KiB
TypeScript
import { Component, output } from '@angular/core';
|
|
import { FormsModule } from '@angular/forms';
|
|
import { FormFieldComponent } from '@shared/ui/form-field/form-field.component';
|
|
import { TextInputComponent } from '@shared/ui/text-input/text-input.component';
|
|
import { ButtonComponent } from '@shared/ui/button/button.component';
|
|
|
|
/** Organism: DigiD-style mock login. No real auth — just composes atoms/molecules. */
|
|
@Component({
|
|
selector: 'app-login-form',
|
|
imports: [FormsModule, FormFieldComponent, TextInputComponent, ButtonComponent],
|
|
template: `
|
|
<form (ngSubmit)="submitted.emit(bsn)" class="app-form app-form-panel">
|
|
<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 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" i18n="@@login.submit">Inloggen met DigiD</app-button>
|
|
</form>
|
|
`,
|
|
})
|
|
export class LoginFormComponent {
|
|
bsn = '';
|
|
password = '';
|
|
submitted = output<string>();
|
|
}
|