# Localization verification

Requirement: `REQ-PRODUCT-LOCALIZATION`. This verifies a selected host-supplied text contract, not the correctness of a translation or a jurisdiction’s legal wording.

Automated checks cover complete/exact message dictionaries; canonical matching locale and explicit direction; review status; UTF-8 limits; fixed placeholders; rejection of markup, control characters and accessor fields; required generated templates or supplied-only documents; localized full-page and embedded document chrome; React/native parity; escaped declared facts; all consent receipt states, storage errors, signal/processing restrictions, accessible names and changed-choice messages; cosmetic vs material scope revisions; retained refusals; independent CF registration against canonical retained archives; archived selected text; and rejection of mismatched notice copy.

The consent runtime includes only selected consent messages. Generated templates and document bodies stay in the build layer. The backend's dependency-free localization validator is generated from the same contract and remains installable separately.

Further checks and limitations: host linguistic/legal review, screen-reader review across platforms, all target fonts/writing systems, advanced plural rules and localization of the remaining interfaces. The Portuguese example is draft wording, not a reviewed Brazilian legal pack. Locale does not select applicability or legal defaults.

Browser checks used the real Portuguese page and a separate synthetic long-text RTL fixture. Accept/reload/withdraw worked; the drawer and policy stayed within narrow mobile viewports. The RTL drawer retained keyboard access to the checkbox while its long body scrolled, with action buttons remaining available. This was a layout stress test, not an Arabic translation review.

A hash comparison preserved all 324 pre-existing retained artifact files. The selected compiled-local consent entry measured below its 15 KiB gzip target; the larger full-configuration compatibility entry still exceeds that target and remains a separate open optimization item. Packaging checks cover the exported localization types and a standalone Cloudflare installation.

Terms-acceptance checks cover complete selected messages, placeholders/limits, matching reviewed archives, schema/enumeration rejection, an unchecked choice, receipt-gated confirmation, every error state, RTL metadata, immutable retries across changed offers, mismatched receipts and legacy English-localized v1 create/register/activate/accept behavior. Terms copy is excluded from compiled consent and material purpose scopes; updating it preserves matching cookie grants. The demo uses a separate session-bound operation and retains language/revision/declared copy for private operator inspection.

The localized terms demo was checked in the browser at desktop and narrow mobile widths: an unchecked statement disables submission, a matching server receipt produces the translated confirmation, and operator inspection exposes the retained language/copy. When a focused control becomes disabled during submission, focus moves to the status message without taking focus from another part of the page. Existing retained artifact files remain unchanged across the additional example.

The terms control also passed a separate long-text RTL layout check at 320px: no horizontal overflow, an intact isolated ISO date, a keyboard-operable checkbox and an action above 44px. Version/date substitutions use bidirectional isolation while keeping their accessible text. This fixture was a layout stress test and was not submitted. The additional example preserves all 328 pre-existing retained artifact files. Packed frontend declarations and the localized offer/controller were checked in an isolated consumer; a separate backend-only consumer registered and accepted that offer and retained its selected copy without resolving the frontend package.

Form-permission tests cover complete v2 dictionaries, exact placeholders, plain-text bounds, archive/copy/locale/revision comparisons, downgrade rejection, unchanged cookie runtime/scopes, initially unchecked native controls and actual acknowledged grant/withdrawal through the Cloudflare API. A pending v1 withdrawal whose acknowledgement was lost retries its unchanged command after a localized v2 activation. Direct message-policy accessors reject without invoking getters; the inherited outer offer JSON-copy boundary is not claimed to reject nested getters. The demo tests prove separate session streams, independent English/Portuguese permission IDs, wrong-route/cross-session denial, retained copy inspection and static legal routes without session provisioning.

The Portuguese form example was checked against a local SQLite Worker at desktop and 390px mobile widths. Preparing the surrounding draft left permission off; explicit grant and withdrawal returned translated acknowledgements, and the operator page exposed retained templates. The expanded mobile details had no horizontal overflow; visible permission actions were 46px tall. This is a Chromium layout/interaction check, not linguistic review or platform-wide accessibility acceptance. All 348 earlier retained artifact files kept their exact bytes. The compiled-local consent graph remains 15,252 bytes gzip and excludes the form-message policy.

Direct-collection checks cover the complete v2 dictionary, fixed placeholders/limits, locale/direction/review declarations, translated branch labels, escaped facts and static React/native parity. Intact-release verification rejects rehashed copy/fact changes and language/version downgrades. English v1 and custom context labels remain supported; selected collection text does not enter cookie runtime/scopes, including standalone CF notice registration. The public Portuguese illustration has no script, submission route or demo-storage allocation. RTL metadata/date isolation is a synthetic layout contract check, not translation review.

The static Portuguese collection example was inspected at 390px in Chromium. Its disclosure starts collapsed and expands using Enter, with no page script or form element. Expanded content has no horizontal document overflow. English v1 normalization and all five allowed heading-level renders were also compared byte for byte with the previous committed renderer. Existing retained releases remain unchanged.

Selected terms, form-permission and collection dictionaries share metadata/body validation. Full-site normalization validates the common language declaration once, then applies each interface's message and serialized-size limits. Standalone frontend and independent Cloudflare parsers retain the same closed metadata contract. No dictionaries or processing facts are defaulted.

Boundary tests accept descriptors at exactly 8,192 bytes for terms and 16,384 bytes for form/collection, and reject one byte above. Fixtures include multibyte text and JSON-escaped quotes/backslashes. They also cover the independent 120-byte form-action cap, accessor rejection without getter execution, hidden/symbol extras, canonical/matching locales, preview review status, output field order, input immutability and full-site missing-body diagnostics. A before/after differential check across 1,074 valid and malformed inputs found identical serialized results or error messages. This verifies validator compatibility, not translation quality.
