{"record":{"id":"5eb29abb7d8cc8f3","repo":"Humanizr/Humanizer","slug":"locale-localecode-surfaces-calendar-monthsgenit-5eb29a","errorCode":null,"errorMessage":"Locale '{localeCode}.surfaces.calendar.monthsGenitive' items must be scalar strings.","messagePattern":"Locale '(.+?)\\.surfaces\\.calendar\\.monthsGenitive' items must be scalar strings\\.","errorType":"validation","errorClass":"InvalidOperationException","httpStatus":null,"severity":"critical","filePath":"src/Humanizer.SourceGenerators/Common/CanonicalLocaleAuthoring.cs","lineNumber":489,"sourceCode":"            }\n\n            if (calendarSurface.TryGetValue(\"monthsGenitive\", out var monthsGenitiveValue))\n            {\n                if (!hasMonths)\n                {\n                    throw new InvalidOperationException(\n                        $\"Locale '{localeCode}.surfaces.calendar.monthsGenitive' requires 'months' to also be present.\");\n                }\n\n                if (monthsGenitiveValue is not SimpleYamlSequence genitiveSeq || genitiveSeq.Items.Length != 12)\n                {\n                    throw new InvalidOperationException(\n                        $\"Locale '{localeCode}.surfaces.calendar.monthsGenitive' must be a sequence of exactly 12 strings.\");\n                }\n\n                if (genitiveSeq.Items.Any(static item => item is not SimpleYamlScalar))\n                {\n                    throw new InvalidOperationException(\n                        $\"Locale '{localeCode}.surfaces.calendar.monthsGenitive' items must be scalar strings.\");\n                }\n            }\n\n            if (calendarSurface.TryGetValue(\"hijriMonths\", out var hijriMonthsValue))\n            {\n                if (hijriMonthsValue is not SimpleYamlSequence hijriSeq || hijriSeq.Items.Length != 12)\n                {\n                    throw new InvalidOperationException(\n                        $\"Locale '{localeCode}.surfaces.calendar.hijriMonths' must be a sequence of exactly 12 strings.\");\n                }\n\n                foreach (var item in hijriSeq.Items)\n                {\n                    if (item is not SimpleYamlScalar scalar)\n                    {\n                        throw new InvalidOperationException(\n                            $\"Locale '{localeCode}.surfaces.calendar.hijriMonths' items must be scalar strings.\");","sourceCodeStart":471,"sourceCodeEnd":507,"githubUrl":"https://github.com/Humanizr/Humanizer/blob/ffc2b77c0f30d2fb176875841424379319d0ae9b/src/Humanizer.SourceGenerators/Common/CanonicalLocaleAuthoring.cs#L471-L507","documentation":"Thrown by AddCalendarFeatures when surfaces.calendar.monthsGenitive is a 12-element sequence but one or more items is not a YAML scalar string (e.g. a nested mapping or sequence). Genitive month names must be plain strings to be emitted into the generated calendar table.","triggerScenarios":"A genitive month entry is a nested object or sub-list. The check genitiveSeq.Items.Any(item => item is not SimpleYamlScalar) at CanonicalLocaleAuthoring.cs:487-491 fires.","commonSituations":"Pasting CLDR objects that wrap month names in metadata; mis-indenting list items into mappings; converting from a structured source.","solutions":["Flatten every genitive month entry to a plain scalar string.","Confirm each item is inline like '- Stycznia' or an inline '[...]' list, not a nested block.","Rebuild to confirm the scalar-items check passes."],"exampleFix":"# before\ncalendar:\n  monthsGenitive:\n    - name: Stycznia\n# after\ncalendar:\n  monthsGenitive: [Stycznia, Lutego, Marca, Kwietnia, Maja, Czerwca, Lipca, Sierpnia, Września, Października, Listopada, Grudnia]","handlingStrategy":"validation","validationCode":"# Ensure every monthsGenitive item is a scalar string.\n# After parsing: $gen | ForEach-Object { $_ -is [string] }.","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Flatten genitive month entries to plain strings.","Prefer inline sequence form to avoid indentation-induced mappings.","Build after edits to surface the offending item."],"tags":["localization","yaml","source-generator","locale","build","calendar"],"backgroundTag":null,"analyzedSha":"ffc2b77c0f30d2fb176875841424379319d0ae9b","analyzedAt":"2026-08-13T21:42:34.584Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}