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:
@@ -14,7 +14,7 @@ import { Component, booleanAttribute, input } from '@angular/core';
|
||||
template: `
|
||||
<div class="rhc-form-field utrecht-form-field" [class.utrecht-form-field--invalid]="!!error()">
|
||||
<label class="utrecht-form-label label" [id]="fieldId() + '-label'" [for]="fieldId()">
|
||||
{{ label() }}@if (required()) { <span class="req">(verplicht)</span> }
|
||||
{{ label() }}@if (required()) { <span class="req" i18n="@@formField.verplicht">(verplicht)</span> }
|
||||
</label>
|
||||
@if (description()) {
|
||||
<div class="utrecht-form-field-description desc" [id]="fieldId() + '-desc'">{{ description() }}</div>
|
||||
|
||||
@@ -6,6 +6,13 @@ export interface RadioOption {
|
||||
label: string;
|
||||
}
|
||||
|
||||
/** The ubiquitous yes/no option pair. Language-agnostic now the labels are
|
||||
localized, so it lives next to RadioOption and both wizards import it. */
|
||||
export const JA_NEE: RadioOption[] = [
|
||||
{ value: 'ja', label: $localize`:@@common.ja:Ja` },
|
||||
{ value: 'nee', label: $localize`:@@common.nee:Nee` },
|
||||
];
|
||||
|
||||
/** Atom: a radio group. Thin wrapper over the Utrecht/RHC radio CSS, wired as a
|
||||
form control so it works with ngModel just like the text-input atom. */
|
||||
@Component({
|
||||
|
||||
@@ -14,7 +14,7 @@ import { Component, OnDestroy, OnInit, input, signal } from '@angular/core';
|
||||
`],
|
||||
template: `
|
||||
@if (visible()) {
|
||||
<div class="sp" role="status" aria-label="Bezig met laden"></div>
|
||||
<div class="sp" role="status" i18n-aria-label="@@spinner.aria" aria-label="Bezig met laden"></div>
|
||||
}
|
||||
`,
|
||||
})
|
||||
|
||||
@@ -38,8 +38,8 @@ import { Component, input } from '@angular/core';
|
||||
.step--current .label{font-weight:var(--rhc-text-font-weight-semi-bold)}
|
||||
`],
|
||||
template: `
|
||||
<nav aria-label="Voortgang">
|
||||
<p class="sr-only">Stap {{ current() + 1 }} van {{ steps().length }}: {{ steps()[current()] }}</p>
|
||||
<nav i18n-aria-label="@@stepper.aria" aria-label="Voortgang">
|
||||
<p class="sr-only" i18n="@@stepper.stapVan">Stap {{ current() + 1 }} van {{ steps().length }}: {{ steps()[current()] }}</p>
|
||||
<ol class="steps">
|
||||
@for (label of steps(); track label; let i = $index) {
|
||||
<li
|
||||
|
||||
Reference in New Issue
Block a user