SKILL.md--- name: add-app-language description: Add a supported application language or regional locale to all-api-hub across application and extension runtimes. Not for ordinary translation-copy edits. --- # Add App Language ## Core principle Treat a new language as a cross-runtime compatibility feature. Define one locale contract, then make application resources, browser manifests, auxiliary locale libraries, and tests agree with it. ## Workflow 1. Establish the current baseline and locale contract. - Run `git status --porcelain` and preserve unrelated work and index state. - Inspect `src/constants/i18n.ts`, `src/utils/i18n/`, `src/components/LanguageSwitcher.tsx`, `i18next.config.ts`, `src/locales/`, `src/public/_locales/`, `tests/utils/i18nLocaleValidation.test.ts`, and nearby language-specific tests. - Inventory separately localized product surfaces before defining scope. Start with the [sponsor catalogs](../sponsor-catalog/SKILL.md), [product announcement feed](../../../public/product-announcements.json), and [standalone uninstall survey](../../../docs/docs/.vuepress/public/uninstall.html). Search public assets and locale resolution code for other surfaces. - Compare each surface with comparable shipped app languages. Match their coverage by default and record any deliberate fallback and its visible result. Use the owning workflow for catalog or campaign changes. Keep a separate decision for full documentation-site translation. - Use current code, directories, and tests as the source of truth. Treat hard-coded language or namespace counts in prose as potentially stale. - Decide the canonical BCP 47 application tag, accepted browser or stored aliases, language-family and regional fallback behavior, Chrome underscore locale identifiers, documentation fallback, and available Day.js, date-fns, and natural-date parser support. - Ask only about unresolved choices that materially affect stored preferences, regional resource sharing, manifest coverage, documentation scope, or new dependencies. Reuse user decisions and established locale conventions; continue independent work while a decision is pending. 2. Check existing focused coverage and characterize uncovered behavior before implementation. The following are coverage targets, not a requirement to edit every test file. - Cover alias normalization and startup language resolution in `tests/utils/i18nLanguage.test.ts`. - Cover selection, accessible names, and persisted preference behavior in `tests/components/LanguageSwitcher.test.tsx`. - Cover resource discovery and Day.js mapping in `tests/utils/i18nResources.test.ts`. - Cover documentation routing or English fallback in `tests/utils/docsLocale.test.ts`. - Cover date-fns display localization when the picker has a matching locale. Evaluate target-language natural input by default; when the current mature parser dependency supports it, add representative va