{"record":{"id":"216144fcf5063fc9","repo":"Humanizr/Humanizer","slug":"locale-locale-localecode-does-not-resolve-requ","errorCode":null,"errorMessage":"Locale '{locale.LocaleCode}' does not resolve required capability '{definition.Key}' from checked-in YAML.","messagePattern":"Locale '(.+?)' does not resolve required capability '(.+?)' from checked-in YAML\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Humanizer.SourceGenerators/Common/LocaleCoverageInput.cs","lineNumber":66,"sourceCode":"                            .Select(static diagnostic => diagnostic.GetMessage())\n                            .OrderBy(static message => message, StringComparer.Ordinal)));\n            }\n            if (catalog.Locales.IsEmpty)\n            {\n                throw new InvalidOperationException(\"Locale coverage requires at least one canonical locale.\");\n            }\n\n            var rows = ImmutableArray.CreateBuilder<LocaleCoverageRow>(catalog.Locales.Length);\n            foreach (var locale in catalog.Locales.OrderBy(static locale => locale.LocaleCode, StringComparer.Ordinal))\n            {\n                var coverage = ImmutableDictionary.CreateBuilder<string, LocaleCoverageStatus>(StringComparer.Ordinal);\n                foreach (var definition in Definitions)\n                {\n                    var resolved = definition.IsResolved(locale);\n                    if (!resolved && !definition.Optional)\n                    {\n                        throw new InvalidOperationException(\n                            $\"Locale '{locale.LocaleCode}' does not resolve required capability '{definition.Key}' from checked-in YAML.\");\n                    }\n\n                    var contributes = definition.AuthoredFeatureNames.Any(locale.AuthoredFeatureNames.Contains);\n                    LocaleCoverageStatus status;\n                    if (contributes)\n                    {\n                        status = new LocaleCoverageStatus(\"own\", null);\n                    }\n                    else if (resolved && locale.VariantOf is not null)\n                    {\n                        status = new LocaleCoverageStatus(\"via\", locale.VariantOf);\n                    }\n                    else\n                    {\n                        status = new LocaleCoverageStatus(definition.Optional ? \"platform\" : \"missing\", null);\n                    }\n                    coverage[definition.Key] = status;\n                }","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/Humanizr/Humanizer/blob/ffc2b77c0f30d2fb176875841424379319d0ae9b/src/Humanizer.SourceGenerators/Common/LocaleCoverageInput.cs#L48-L84","documentation":"Thrown by LocaleCoverageInput.Create when a locale fails to resolve a non-optional capability from checked-in YAML. The coverage generator requires every shipped locale to provide or inherit each mandatory capability (formatter, phrases, inflection, numberToWords, wordsToNumber, ordinalizer, dateToOrdinalWords, timeOnlyToClockNotation, headings, list); a gap means the locale is incompletely specified.","triggerScenarios":"A locale YAML is missing one of the required capability sections and does not inherit it from a parent via variantOf. For example, a locale defines formatter but no phrases, or its variantOf parent also lacks the capability.","commonSituations":"Adding a new locale that is not yet complete, or deleting a capability section from an existing locale. The error names the locale code and the missing capability key so the contributor knows exactly what to add.","solutions":["Read the message: it names the locale code and the missing capability key (e.g. 'phrases', 'formatter').","Add the missing section to the locale YAML, or set variantOf to a parent locale that provides it.","For new locales, ensure all required capabilities are present before enabling locale coverage."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# For the locale named in the message, confirm each required capability\n# section exists or is inherited via variantOf:\n#   rg \"^(formatter|phrases|inflection|numberToWords|wordsToNumber|ordinalizer|dateToOrdinalWords|dateOnlyToOrdinalWords|timeOnlyToClockNotation|headings|collectionFormatter):\" src/Humanizer/Locales/<code>.yml","typeGuard":null,"tryCatchPattern":null,"preventionTips":["New locales must provide or inherit every required capability before enabling coverage.","When deleting a capability section, confirm no locale relies on it as its own or inherited form.","Use variantOf to inherit capabilities from a complete parent locale."],"tags":["source-generator","locale-yaml","configuration","build-time","locale-coverage","humanizer"],"backgroundTag":null,"analyzedSha":"ffc2b77c0f30d2fb176875841424379319d0ae9b","analyzedAt":"2026-08-13T21:42:34.584Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}