feat(shared): add LanguageResolverService for normalizing + localizing language codes#2005
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📜 Recent review details⏰ Context from checks skipped due to timeout. (3)
🧰 Additional context used📓 Path-based instructions (7)frontend/src/**/*.{ts,tsx,html,scss}📄 CodeRabbit inference engine (AGENTS.md)
Files:
frontend/src/**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
frontend/src/**/*.{ts,tsx,html}📄 CodeRabbit inference engine (AGENTS.md)
Files:
frontend/src/**/*.{test,spec}.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*⚙️ CodeRabbit configuration file
Files:
**/*.spec.ts⚙️ CodeRabbit configuration file
Files:
**/*.service.ts⚙️ CodeRabbit configuration file
Files:
🧠 Learnings (5)📚 Learning: 2026-04-05T21:16:01.715ZApplied to files:
📚 Learning: 2026-04-07T09:28:09.587ZApplied to files:
📚 Learning: 2026-04-11T03:55:57.229ZApplied to files:
📚 Learning: 2026-05-18T14:54:39.422ZApplied to files:
📚 Learning: 2026-06-30T01:30:43.644ZApplied to files:
🔇 Additional comments (2)
WalkthroughAdds ChangesLanguage resolution
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant LanguageResolverService
participant IntlAPIs
Caller->>LanguageResolverService: resolve(raw)
LanguageResolverService->>IntlAPIs: canonicalize and look up names
IntlAPIs-->>LanguageResolverService: language, region, or script names
LanguageResolverService-->>Caller: ResolvedLanguage or null
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
This PR adds a shared
LanguageResolverService, which is the first step towards refactoring the platform to more pragmatically handle displaying/viewing/filtering by languages.Linked Issue
Resolves #2004
Changes
LanguageResolverServicethat outputs languages in a structSample
ResolveLanguagestructs:Canadian English w/ French locale active:
Klingon (unknown value):
Canadian English w/ English locale active:
Manual Testing Steps
Screenshots (Optional)
N/A
Additional Context (Optional)
This is the first PR to implement this shared service. The following PRs will then refactor existing language spots to use the service
AI Disclosure
Spec coverage
Checklist
just ui checkandjust api check.Summary by CodeRabbit
New Features
Tests