Files
skills/docs/ui/react/react-auth/src/translations/cy-gb.md
2026-05-29 08:20:56 +01:00

1.6 KiB

cy-gb

Purpose

cy-gb.ts ships the Welsh (Cymraeg, cy-GB) translation pack for the auth surface. The file conforms structurally to AuthTranslationPack — every key present in en-gb.ts MUST be present here, otherwise tsc fails the typecheck gate. This guarantees Wave 2 form components can resolve any key in any locale without locale-specific guards. Pure data; no runtime code.

Features

  • Welsh copy across all 10 functional groups.
  • Compile-time conformance to AuthTranslationPack.
  • Default-exported for direct consumption (import cyGb from "@suaveplan/react-auth/translations").

Usage: Basic

import { cyGb } from "@suaveplan/react-auth";
console.log(cyGb.auth.login.title); // "Mewngofnodi"

Usage: Advanced

import { authTranslations } from "@suaveplan/react-auth";

function detectLocaleAndResolve(prefersWelsh: boolean) {
    const locale = prefersWelsh ? "cy-gb" : "en-gb";
    return authTranslations[locale].auth.login.forgotPassword;
}

API Reference

  • default — the Welsh translation pack of type AuthTranslationPack.

Implementation Notes

Translations are reviewed by a fluent Welsh speaker before each release; the strings here are the verbatim upstream copy. When a string would mention a date or a number, the Wave 2 form components will inject ICU-formatted values through @suaveplan/i18n-icu-parser — the strings stored here intentionally avoid pre-formatted numerics. Punctuation conventions (e.g. apostrophe usage, full-stop placement in error messages) follow standard editorial conventions for Welsh, matching the upstream pack.