{"record":{"id":"86b55cd4b51364df","repo":"Humanizr/Humanizer","slug":"case-overlay-path-must-explicitly-define-numer","errorCode":null,"errorMessage":"Case overlay '{path}' must explicitly define numeric multiple forms.","messagePattern":"Case overlay '(.+?)' must explicitly define numeric multiple forms\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Humanizer.SourceGenerators/Common/DurationCaseModels.cs","lineNumber":854,"sourceCode":"                \"arabic-cardinal\" => [\"default\", \"zero\", \"dual\", \"plural\", \"many\"],\n                \"between2-and4-paucal\" or \"polish\" => [\"default\", \"paucal\"],\n                \"south-slavic\" or \"russian\" =>\n                    [\"default\", \"singular\", \"paucal\"],\n                \"slovenian\" => [\"default\", \"dual\", \"paucal\"],\n                \"lithuanian\" => [\"default\", \"singular\", \"plural\"],\n                _ => throw new InvalidOperationException(\n                    $\"Duration case phrases use unsupported plural rule '{pluralRule}'.\")\n            };\n\n        static void ValidateReachableMultipleForms(\n            SimpleYamlValue phraseValue,\n            string path,\n            ImmutableArray<string> requiredMultipleForms)\n        {\n            var phrase = ExpectMapping(phraseValue, path);\n            if (!phrase.TryGetValue(\"multiple\", out var multipleValue))\n            {\n                throw new InvalidOperationException(\n                    $\"Case overlay '{path}' must explicitly define numeric multiple forms.\");\n            }\n\n            if (requiredMultipleForms.IsEmpty)\n            {\n                return;\n            }\n\n            var multiple = ExpectMapping(multipleValue, $\"{path}.multiple\");\n            var hasScalarDefault = false;\n            SimpleYamlMapping? forms = null;\n            if (multiple.TryGetValue(\"forms\", out var formsValue))\n            {\n                hasScalarDefault = formsValue is SimpleYamlScalar;\n                forms = formsValue as SimpleYamlMapping;\n            }\n            else\n            {","sourceCodeStart":836,"sourceCodeEnd":872,"githubUrl":"https://github.com/Humanizr/Humanizer/blob/ffc2b77c0f30d2fb176875841424379319d0ae9b/src/Humanizer.SourceGenerators/Common/DurationCaseModels.cs#L836-L872","documentation":"Thrown by ValidateReachableMultipleForms when a phrase value (either in a duration-case realization or in the citation base-duration surface) has no 'multiple' key at all. The validator first checks that a 'multiple' entry exists before proceeding to inspect individual plural forms.","triggerScenarios":"A phrase mapping defines only 'single' (or other keys) but omits the 'multiple' key entirely, so TryGetValue('multiple', ...) returns false.","commonSituations":"A contributor authoring case-aware duration phrases for a locale with a plural rule forgets the 'multiple' sub-mapping, or assumes the generator will inherit a default multiple form from the base phrases.duration surface.","solutions":["Add a 'multiple' key to the phrase mapping at the reported path.","Populate it with a 'forms' sub-mapping containing at least the plural forms required by the locale's plural rule (see GetRequiredMultipleForms).","Rebuild to confirm the validator passes."],"exampleFix":"# before\nsecond:\n  phrase:\n    single: jedna sekunda\n# after\nsecond:\n  phrase:\n    single: jedna sekunda\n    multiple:\n      forms:\n        default: sekund\n        paucal: sekundy","handlingStrategy":"validation","validationCode":"# Pre-build: ensure every phrase in durationCases has a 'multiple' key\n# Use yq or python to walk the YAML tree and flag phrases lacking 'multiple'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When authoring a phrase for a locale with a plural rule, always include the 'multiple' sub-mapping.","Use a locale with the same plural rule as a reference template.","Build after adding each phrase to catch the missing-multiple error at the specific path."],"tags":["humanizer","locale","yaml","source-generator","duration-cases","phrase","build-time"],"backgroundTag":null,"analyzedSha":"ffc2b77c0f30d2fb176875841424379319d0ae9b","analyzedAt":"2026-08-13T21:42:34.584Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}