{"record":{"id":"d59abc6f10d78437","repo":"Humanizr/Humanizer","slug":"inflection-lexeme-id-defines-unsupported-displ","errorCode":null,"errorMessage":"Inflection lexeme '{id}' defines unsupported display category '{category}'.","messagePattern":"Inflection lexeme '(.+?)' defines unsupported display category '(.+?)'\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Humanizer.SourceGenerators/Generators/ProfileCatalogs/InflectionCatalogParsing.cs","lineNumber":324,"sourceCode":"                var display = ImmutableDictionary.CreateBuilder<string, InflectionFormInput>(StringComparer.Ordinal);\n                foreach (var category in ReachableCategories(cardinalRule))\n                {\n                    display[category] = ParseForm(\n                        displayMapping,\n                        category,\n                        alternateName: null,\n                        id,\n                        ownerScripts,\n                        casing);\n                }\n\n                foreach (var category in displayMapping.Values.Keys.OrderBy(\n                             static value => value,\n                             StringComparer.Ordinal))\n                {\n                    if (!PluralCategories.Contains(category))\n                    {\n                        throw new InvalidOperationException(\n                            $\"Inflection lexeme '{id}' defines unsupported display category '{category}'.\");\n                    }\n\n                    if (!display.ContainsKey(category))\n                    {\n                        display[category] = ParseForm(\n                            displayMapping,\n                            category,\n                            alternateName: null,\n                            id,\n                            ownerScripts,\n                            casing);\n                    }\n                }\n\n                lexemes.Add(new(\n                    id,\n                    countability,","sourceCodeStart":306,"sourceCodeEnd":342,"githubUrl":"https://github.com/Humanizr/Humanizer/blob/ffc2b77c0f30d2fb176875841424379319d0ae9b/src/Humanizer.SourceGenerators/Generators/ProfileCatalogs/InflectionCatalogParsing.cs#L306-L342","documentation":"The keys under a lexeme's 'forms.display' must be valid CLDR plural categories: 'zero', 'one', 'two', 'few', 'many', 'other'. ParseLexemes throws when an author writes a key outside the PluralCategories set.","triggerScenarios":"A lexeme 'display:' block contains a category key not in {zero, one, two, few, many, other} (e.g. 'singular', 'plural', 'many2').","commonSituations":"Using 'singular'/'plural' instead of 'one'/'other'; leftover keys from an older schema; adding a category not reachable by the cardinal rule.","solutions":["Rename the key to a valid CLDR category (typically 'one' and 'other')","Remove the unsupported key"],"exampleFix":"# before\n          display:\n            singular:\n              preferred: 'cat'\n              accepted: [ 'cat' ]\n# after\n          display:\n            one:\n              preferred: 'cat'\n              accepted: [ 'cat' ]","handlingStrategy":"validation","validationCode":"var cats = new[] { \"zero\", \"one\", \"two\", \"few\", \"many\", \"other\" };\nforeach (var lexeme in lexemes)\nforeach (var key in lexeme.Forms.Display.Keys)\n    if (!cats.Contains(key))\n        Report($\"{locale}: unsupported display category '{key}'.\");","typeGuard":"static bool CategoryValid(string c) =>\n    c is \"zero\" or \"one\" or \"two\" or \"few\" or \"many\" or \"other\";","tryCatchPattern":null,"preventionTips":["Use CLDR plural category names (one/other) rather than singular/plural"],"tags":["inflection","localization","yaml","source-generator","locale","validation"],"backgroundTag":null,"analyzedSha":"ffc2b77c0f30d2fb176875841424379319d0ae9b","analyzedAt":"2026-08-13T21:42:34.584Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}