localization-testing
关于
This skill automates internationalization and localization testing for global products, including translation coverage, locale-specific formats, and RTL language support. It's designed for developers launching in new markets or building multi-language applications to validate cultural appropriateness and character encoding. Use it to systematically verify i18n/l10n requirements across text, visuals, and regional formats.
快速安装
Claude Code
推荐/plugin add https://github.com/proffesor-for-testing/agentic-qegit clone https://github.com/proffesor-for-testing/agentic-qe.git ~/.claude/skills/localization-testing在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
Localization & Internationalization Testing
<default_to_action> When testing multi-language/region support:
- VERIFY translation coverage (all strings translated)
- TEST locale-specific formats (date, time, currency, numbers)
- VALIDATE RTL layout (Arabic, Hebrew)
- CHECK character encoding (UTF-8, unicode)
- CONFIRM cultural appropriateness (icons, colors, content)
Quick i18n Checklist:
- All user-facing strings externalized
- No hardcoded text in code
- Date/time/currency formatted per locale
- RTL languages flip layout correctly
- Unicode characters display properly
Critical Success Factors:
- Don't hardcode strings - externalize everything
- Test with real speakers, not just translation files
- RTL requires mirrored UI layout </default_to_action>
Quick Reference Card
When to Use
- Launching in new markets
- Adding language support
- Before international releases
- After UI changes
i18n vs l10n
| Term | Full Name | Focus |
|---|---|---|
| i18n | Internationalization | Building for localization |
| l10n | Localization | Adapting for specific locale |
Common Locale Formats
| Type | US (en-US) | UK (en-GB) | Japan (ja-JP) |
|---|---|---|---|
| Date | 10/24/2025 | 24/10/2025 | 2025/10/24 |
| Currency | $1,234.56 | £1,234.56 | ¥1,235 |
| Number | 1,234.56 | 1,234.56 | 1,234.56 |
Translation Coverage Testing
test('all strings are translated', () => {
const enKeys = Object.keys(translations.en);
const frKeys = Object.keys(translations.fr);
const esKeys = Object.keys(translations.es);
// All locales have same keys
expect(frKeys).toEqual(enKeys);
expect(esKeys).toEqual(enKeys);
});
test('no missing translation placeholders', async ({ page }) => {
await page.goto('/?lang=fr');
const text = await page.textContent('body');
// Should not see placeholder keys
expect(text).not.toContain('translation.missing');
expect(text).not.toMatch(/\{\{.*\}\}/); // {{key}} format
});
Date/Time/Currency Formats
test('date formats by locale', () => {
const date = new Date('2025-10-24');
expect(formatDate(date, 'en-US')).toBe('10/24/2025');
expect(formatDate(date, 'en-GB')).toBe('24/10/2025');
expect(formatDate(date, 'ja-JP')).toBe('2025/10/24');
});
test('currency formats by locale', () => {
const amount = 1234.56;
expect(formatCurrency(amount, 'en-US', 'USD')).toBe('$1,234.56');
expect(formatCurrency(amount, 'de-DE', 'EUR')).toBe('1.234,56 €');
expect(formatCurrency(amount, 'ja-JP', 'JPY')).toBe('¥1,235');
});
RTL (Right-to-Left) Testing
test('layout flips for RTL languages', async ({ page }) => {
await page.goto('/?lang=ar'); // Arabic
const dir = await page.locator('html').getAttribute('dir');
expect(dir).toBe('rtl');
// Navigation should be on right
const nav = await page.locator('nav');
const styles = await nav.evaluate(el =>
window.getComputedStyle(el)
);
expect(styles.direction).toBe('rtl');
});
test('icons/images appropriate for RTL', async ({ page }) => {
await page.goto('/?lang=he'); // Hebrew
// Back arrow should point right in RTL
const backIcon = await page.locator('.back-icon');
expect(await backIcon.getAttribute('class')).toContain('rtl-flipped');
});
Unicode Character Support
test('supports unicode characters', async ({ page }) => {
// Japanese
await page.fill('#name', '山田太郎');
await page.click('#submit');
const saved = await db.users.findOne({ /* ... */ });
expect(saved.name).toBe('山田太郎');
// Arabic
await page.fill('#name', 'محمد');
// Emoji
await page.fill('#bio', '👋🌍');
expect(saved.bio).toBe('👋🌍');
});
Agent-Driven Localization Testing
// Comprehensive localization validation
await Task("Localization Testing", {
url: 'https://example.com',
locales: ['en-US', 'fr-FR', 'de-DE', 'ja-JP', 'ar-SA'],
checks: ['translations', 'formats', 'rtl', 'unicode'],
detectHardcodedStrings: true
}, "qe-test-generator");
// Returns:
// {
// locales: 5,
// missingTranslations: 3,
// formatIssues: 1,
// rtlIssues: 0,
// hardcodedStrings: ['button.submit', 'header.title']
// }
Agent Coordination Hints
Memory Namespace
aqe/localization-testing/
├── translations/* - Translation coverage
├── formats/* - Locale-specific formats
├── rtl-validation/* - RTL layout checks
└── unicode/* - Character encoding tests
Fleet Coordination
const l10nFleet = await FleetManager.coordinate({
strategy: 'localization-testing',
agents: [
'qe-test-generator', // Generate l10n tests
'qe-test-executor', // Execute across locales
'qe-visual-tester' // RTL visual validation
],
topology: 'parallel'
});
Related Skills
- accessibility-testing - Language accessibility
- compatibility-testing - Cross-platform i18n
- visual-testing-advanced - RTL visual regression
Remember
Don't hardcode. Externalize all user-facing strings. Every string visible to users must come from translation files, not code.
Test with native speakers, not just translation files. Machine translations and translation files can have context issues that only native speakers catch.
With Agents: Agents validate translation coverage, detect hardcoded strings, test locale-specific formatting, and verify RTL layouts automatically across all supported languages.
GitHub 仓库
相关推荐技能
i18n-automation
元这个Claude Skill可自动化Web应用的国际化工作流,特别适合React/Next.js项目。它能处理翻译、键值生成、库配置和本地化设置,支持多种文件格式和RTL语言。开发者可快速实现多语言支持,无需手动配置i18n架构。
regression-testing
其他该Skill提供智能化的回归测试策略,帮助开发者在验证代码修复时确保现有功能不被破坏。它通过变更影响分析和风险评估,智能选择测试用例并优化执行顺序,避免全量测试的时间消耗。适用于CI/CD流程中的测试套件规划、变更验证和快速反馈场景,能显著提升回归测试效率。
test-environment-management
其他该Skill专注于测试环境管理,提供基于基础设施即代码的自动化配置,支持使用Docker/Kubernetes确保环境一致性。它适用于创建与生产环境保持高度一致的测试环境,并通过服务虚拟化和成本优化策略来提升测试效率。开发者可用它来管理测试基础设施生命周期,优化资源使用成本。
mutation-testing
其他该Skill通过变异测试评估测试套件的有效性,自动生成代码变异并计算杀灭率来验证测试质量。它适用于识别薄弱测试、证明测试能真正捕获bug,以及提升测试覆盖的可靠性。关键能力包括执行变异分析、定位存活变异,并提供具体的测试强化指导。
