{"record":{"id":"b8e6b70444e89b38","repo":"Humanizr/Humanizer","slug":"locale-localecode-path-must-contain-at-most","errorCode":null,"errorMessage":"Locale '{localeCode}.{path}' must contain at most 60 entries for minute slots 0 through 59.","messagePattern":"Locale '(.+?)\\.(.+?)' must contain at most 60 entries for minute slots 0 through 59\\.","errorType":"validation","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Humanizer.SourceGenerators/Common/CanonicalLocaleAuthoring.cs","lineNumber":288,"sourceCode":"                SimpleYamlSequence sequence => NormalizeMinuteWordsSequence(localeCode, path, sequence),\n                SimpleYamlMapping mapping => NormalizeMinuteWordsMapping(localeCode, path, mapping),\n                _ => throw new InvalidOperationException(\n                    $\"Locale '{localeCode}.{path}' must be a sequence or sparse numeric mapping.\")\n            };\n\n            var normalizedClockSurface = clockSurface.Values.ToBuilder();\n            normalizedClockSurface[\"minuteWordsMap\"] = normalizedMinuteWordsMap;\n            return new SimpleYamlMapping(normalizedClockSurface.ToImmutable());\n        }\n\n        static SimpleYamlMapping NormalizeMinuteWordsSequence(\n            string localeCode,\n            string path,\n            SimpleYamlSequence sequence)\n        {\n            if (sequence.Items.Length > 60)\n            {\n                throw new InvalidOperationException(\n                    $\"Locale '{localeCode}.{path}' must contain at most 60 entries for minute slots 0 through 59.\");\n            }\n\n            var normalizedValues = ImmutableDictionary.CreateBuilder<string, SimpleYamlValue>(StringComparer.Ordinal);\n            for (var index = 0; index < sequence.Items.Length; index++)\n            {\n                ValidateMinuteWordValue(localeCode, path, index.ToString(CultureInfo.InvariantCulture), sequence.Items[index], allowEmpty: true);\n                normalizedValues[index.ToString(CultureInfo.InvariantCulture)] = sequence.Items[index];\n            }\n\n            return new SimpleYamlMapping(normalizedValues.ToImmutable());\n        }\n\n        static SimpleYamlMapping NormalizeMinuteWordsMapping(\n            string localeCode,\n            string path,\n            SimpleYamlMapping mapping)\n        {","sourceCodeStart":270,"sourceCodeEnd":306,"githubUrl":"https://github.com/Humanizr/Humanizer/blob/ffc2b77c0f30d2fb176875841424379319d0ae9b/src/Humanizer.SourceGenerators/Common/CanonicalLocaleAuthoring.cs#L270-L306","documentation":"The dense (sequence) form of minuteWordsMap may have at most 60 entries, one per minute slot 0-59 (CanonicalLocaleAuthoring.cs:286-290). Extra entries have no minute to map to.","triggerScenarios":"Pasting a list with 61+ items into minuteWordsMap.","commonSituations":"Including a label/heading line as the first element; appending extra values by mistake.","solutions":["Trim the sequence to at most 60 string entries.","Prefer the sparse mapping form if you only need a handful of overrides.","Rebuild."],"exampleFix":"# before\nsurfaces:\n  clock:\n    minuteWordsMap: [\"zero\", ... 64 items ...]\n# after\nsurfaces:\n  clock:\n    minuteWordsMap: [\"zero\", ... exactly <=60 items ...]","handlingStrategy":"validation","validationCode":"import yaml, sys\ndoc = yaml.safe_load(open(sys.argv[1], encoding='utf-8'))\nm = ((doc.get('surfaces') or {}).get('clock') or {}).get('minuteWordsMap')\nif isinstance(m, list):\n    assert len(m) <= 60, f'minuteWordsMap dense form has {len(m)} entries (max 60)'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Author locales against the canonical schema; the error message lists the exact allowed names.","Run `dotnet build src/Humanizer/Humanizer.csproj` locally so the generator reports locale errors before push.","Copy an existing compliant locale file as your template rather than writing YAML from scratch."],"tags":["locale-authoring","yaml","source-generator","build","localization","clock"],"backgroundTag":null,"analyzedSha":"ffc2b77c0f30d2fb176875841424379319d0ae9b","analyzedAt":"2026-08-13T21:42:34.584Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}