sif-intl

Implement and validate type-safe nb/nn i18n with parameter and semantic checks.

2|Updated Jun 3, 2022
One-click install
npx skills add https://github.com/navikt/sif-brukerdialog --skill sif-intl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sif-intl
Source: https://github.com/navikt/sif-brukerdialog/tree/main/.github/skills/sif-intl
Command: npx skills add https://github.com/navikt/sif-brukerdialog --skill sif-intl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This pattern provides robust guidance for implementing type-safe i18n in nb/nn across applications and libraries, ensuring consistent translations and safe parameter handling.

Core Features & Use Cases

  • Type-safe nb.ts and nn.ts generation with key mappings
  • Parameter verification to ensure identical {param} tokens across languages
  • Semantic meaning checks to ensure nb and nn texts convey equivalent messages
  • Aggregation of messages via shared i18n index files and appMessages

Quick Start

Create nb.ts and nn.ts for your i18n keys and verify identical parameter tokens across languages.

Frequently Asked Questions about sif-intl

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement type-safe i18n for Norwegian Bokmål and Nynorsk in TypeScript?

You verify type-safe nb/nn i18n by enforcing identical ICU parameter contracts, checking semantic equivalence between Bokmål and Nynorsk UI messages, and aggregating translations through shared appMessages and i18n index files.

What is the best way to verify identical ICU parameter tokens across nb and nn translations?

Verifying identical parameter tokens across nb and nn requires enforcing strict ICU parameter contracts during the i18n key extraction process. This mechanism ensures both languages receive matching dynamic variables to prevent runtime translation errors.

When do I need to extract or add new i18n keys for my application messages?

You need to extract or add i18n keys when expanding UI messages across applications and libraries, ensuring you maintain frontmatter entry points, key naming conventions, and aggregation through appMessages and i18n index files.

How do I aggregate localized messages across multiple applications and packages?

You aggregate localized messages by consolidating nb.ts and nn.ts files through shared i18n index files and appMessages. This approach enforces key naming conventions and frontmatter entry points to maintain type-safe parameter handling across packages.

Does this i18n pattern enforce semantic meaning checks between Bokmål and Nynorsk texts?

Yes, semantic meaning checks ensure nb and nn texts convey equivalent UI messages. This validation process compares the translated output to verify that both Norwegian language variants communicate identical functional meaning to the user.