Bilingual EN/FR content validation using next-intl. Use when adding translated content, testing language switching, or validating message key coverage before deployment.
97
Quality
95%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Validate bilingual content completeness and correctness for EN/FR localization in the AI-HUB-Portal using next-intl.
Verify all keys exist in both languages:
# Run message key audit
node .github/skills/i18n/message-key-audit.jsExpected output:
✓ All EN keys have FR translations
✓ All FR keys have EN equivalents
✗ Missing translations:
- HomePage.newFeature (missing FR)
- Navigation.logout (missing EN)Bad:
<h1>Welcome to AI Hub</h1> // Hardcoded EnglishGood:
import { useTranslations } from 'next-intl';
const t = useTranslations('HomePage');
<h1>{t('welcome')}</h1>// Dates
<p>{format(new Date(), 'PPP', { locale })}</p>
// Numbers
<p>{new Intl.NumberFormat(locale).format(1234567)}</p>Test both languages load correctly:
# Run E2E language switching test
npm run test:e2e -- i18n-test-template.ts| Task | Command/Pattern |
|---|---|
| Find missing keys | node message-key-audit.js |
| Add new message | Update messages/en.json and messages/fr.json |
| Test language switch | Use E2E template |
| Validate pluralization | Check {count, plural, ...} syntax |
Issue: Text not translating
en.json and fr.jsonuseTranslations namespace matches file structureIssue: Language switch not working
See: i18n-test-template.ts for E2E test template
testing - Use for comprehensive i18n testingcode-review - Validates no hardcoded stringsdeployment - Verify translations before productionmessage-key-audit.js - Script to find missing translationsi18n-test-template.ts - E2E test template for language switching5fc5234
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.