monica-ui-localization
Skill13 starsChanged 7 months agoMITView on GitHub
This skill should be used when creating, modifying, validating, or reviewing Monica UI localization/i18n resources, replacing hardcoded user-facing text, adding IStringLocalizer usage, registering localized pages or navigation categories, synchronizing zh-CN/en-US JSON files, or running the Monica localization validator.
In this repository100 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- code-simplifierSkill
- microsoft-code-referenceSkill
- microsoft-docsSkill
- microsoft-skill-creatorSkill
- monica-application-microserviceSkill
- monica-application-modular-monolithSkill
- monica-application-project-unit-developmentSkill
- monica-applicationSkill
- monica-application-unit-testingSkill
- monica-architectureSkill
- monica-contributionSkill
- monica-developmentSkill
- monica-docs-authoringSkill
- monica-frameworkSkill
- monica-guideSkill
- monica-infra-aiSkill
- monica-infra-configurationSkill
- monica-infra-hostingSkill
- monica-infra-jobsSkill
- monica-infra-messagingSkill
- monica-infra-observabilitySkill
- monica-infra-persistenceSkill
- monica-infra-uiSkill
- monica-infra-webSkill
- monica-opentelemetrySkill
- monica-requirement-designSkill
- monica-third-party-module-developmentSkill
- monica-ui-auditSkill
- monica-ui-bridge-debugSkill
- monica-ui-designSkill
- monica-ui-developmentSkill
- monica-unit-testingSkill
- planning-with-filesSkill
- playwright-cliSkill
- code-simplifierSkill
- microsoft-code-referenceSkill
- microsoft-docsSkill
- microsoft-skill-creatorSkill
- monica-application-microserviceSkill
- monica-application-modular-monolithSkill
- monica-application-project-unit-developmentSkill
- monica-applicationSkill
- monica-application-unit-testingSkill
- monica-architectureSkill
- monica-contributionSkill
- monica-developmentSkill
- monica-docs-authoringSkill
- monica-frameworkSkill
- monica-guideSkill
- monica-infra-aiSkill
- monica-infra-configurationSkill
- monica-infra-hostingSkill
- monica-infra-jobsSkill
- monica-infra-messagingSkill
- monica-infra-observabilitySkill
- monica-infra-persistenceSkill
- monica-infra-uiSkill
- monica-infra-webSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 1 is distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
All script paths in this document are relative to the monica-ui-localization skill directory.
- Very specific: line 15
Use decentralized module resources with marker class + JSON resource files under the project root Localization/ directory.
- Very specific: line 16
Keep zh-CN.json and en-US.json synchronized for every changed resource.
- Very specific: line 27
Prefer nested JSON objects and access them with colon-separated keys such as Page:Title or RuntimeConfigDialog:Intro.
- Very specific: line 28
Do not use flat dot-style keys such as Page.Title for new Monica UI work.
- Very specific: line 29
Prefer dependency-injected IStringLocalizer<TResource> in Razor components, pages, dialogs, state classes, support services, and any …
- Very specific: line 30
Never use ambient or static localization access.
- Very specific: line 33
Every localized page must use RegisterLocalizedPage<TPage, TResource>(...).
- Very specific: line 35
Treat category identity and category text as separate contracts.
- Distinctive: line 36
Never group by translated category labels.
- Very specific: line 68
Read references/localization-guide.md when creating new resource files, debugging missing translations, adding parameterized strings, or …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Monica UI Localization
This skill owns Monica UI localization and i18n validation.
All script paths in this document are relative to the monica-ui-localization skill directory.
Required Workflow
- Replace every user-facing UI string with localization. Do not hardcode labels, button text, helper text, dialog text, snackbar messages, placeholders, table headers, empty states, or navigation/AppBar text.
- Use decentralized module resources with marker class + JSON resource files under the project root
Localization/directory. - Keep
zh-CN.jsonanden-US.jsonsynchronized for every changed resource. - Finish every i18n change by running the strict validator from the repository root:
python scripts/validate_localization.py --strictThe strict result must have zero JSON integrity errors, missing keys, invalid navigation resource keys, unused keys, and language sync issues. A non-strict PASSED result with unused-key warnings is not acceptable for completed i18n work.
Core Rules
- Prefer nested JSON objects and access them with colon-separated keys such as
Page:TitleorRuntimeConfigDialog:Intro. - Do not use flat dot-style keys such as
Page.Titlefor new Monica UI work. - Prefer dependency-injected
IStringLocalizer<TResource>in Razor components, pages, dialogs, state classes, support services, and any DI-created service. - Never use ambient or static localization access. When DI is unavailable inside a helper or view model, accept an
IStringLocalizerparameter or move the display behavior into a cohesive formatter that receives one. - Inject
ILocalizationCatalogonly for scenarios that genuinely need generic resource lookup. At application-composition boundaries such as endpoint metadata configuration, resolve the localizer or catalog from the current host's service provider so localization state never crosses host boundaries. - For page content, use the module-local resource marker and JSON files.
- Every localized page must use
RegisterLocalizedPage<TPage, TResource>(...). The page-title key lives in the owning module'sTResource; no implicit or central page resource exists. - The owning module must contribute every navigation resource through
module.Require<ModuleLocalization, ModuleLocalizationOption>(option => option.AddResource<TResource>())inDescribe, so direct and transitive inclusion behave identically. - Treat category identity and category text as separate contracts. Use
BuiltInNavigationCategoryIdsfor the small shell-owned taxonomy, or callRegisterLocalizedCategory<TResource>(stableId, displayNameKey, order)once for a module-owned category and pass the returned ID to its pages. - Never group by translated category labels. Stable category IDs are case-insensitive, publisher-qualified for independent packages, and category order is explicit rather than culture-dependent.
RegisterLocalizedComponentandUIRegistryResourceare obsolete architecture and must not appear in new or migrated code.- Resource marker classes and JSON folders stay under the project root
Localization/directory, not feature folders.
Validation Commands
Basic validation:
python scripts/validate_localization.pyStrict validation:
python scripts/validate_localization.py --strictJSON output:
python scripts/validate_localization.py --strict --jsonValidate another root:
python scripts/validate_localization.py --root <project-root> --strictReference
Read references/localization-guide.md when creating new resource files, debugging missing translations, adding parameterized strings, or fixing validator failures.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

