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:
- No alternatives documented
💭 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
APIs/backend-vitto-api/src/app/module-generation/utils/pluralize.util.ts
🔗 Related
- Decision ID:
dev_1773763286274_i1cfdmi - Session: 230
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation