Implementation: How to handle irregular English plurals in generated collect...

Documentation for Sessions

⚙️ Implementation: How to handle irregular English plurals in generated collect...

Date: 2026-03-17
Time: 16:01:26 UTC
Session: gspace1-230.4
Agent: angular
Confidence: 95%
Status: ✅ Documented


📋 Decision Context

Question:

How to handle irregular English plurals in generated collection names?

Task: S230: Review and fix platform generation pipeline


🎯 Decision Made

Chosen:

Added IRREGULAR_PLURALS lookup map to pluralize.util.ts with 30+ common irregular nouns (child→children, person→people, leaf→leaves, etc.). Also added -f/-fe → -ves rule for words like calf, shelf. Lookup runs before suffix rules.

Options Considered:


💭 Reasoning

Generated platforms had collectionName = 'childs' instead of 'children'. The simple suffix-based pluralize() couldn't handle English irregulars. Adding a lookup map is O(1) and covers the most common domain entity names without pulling in a heavy NLP dependency. The map is easily extendable by future sessions.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation