Yoruba Localization Testing
Use this skill when implementing or reviewing Yoruba–English interfaces. It targets correctness of Yoruba typography, message handling, and user experience, rather than providing automatically approved translations. It complements i18n-sync (message parity) and accessibility (assistive technology support).
When to Activate
- Building web or mobile interfaces with
yo or en locale options.
- Fixing misplaced, removed, or corrupted Yoruba diacritics in text, input, search, storage, or exports.
- Reviewing English fallbacks, language selection, localization regression tests, and screen-reader language metadata.
- Evaluating an AI-generated Yoruba translation before it is released to users.
Core Concepts
- Yoruba includes distinct letters
ẹ, ọ, ṣ and tone-marked vowels such as á, à, ẹ́, and ọ̀. Tone and underdot differences can change meaning.
- Store and transmit text in UTF-8. Normalize to NFC for canonical comparisons or consistent storage, but do not strip tones or underdots from the visible text.
- Prefer BCP 47 language tags
yo and en. Set the screen-reader language for Yoruba text (for example, lang="yo" on web content), and verify the assistive technology's actual language support.
- Do not replace human review with machine translation. Require fluent Yoruba review for meaning, naturalness, tone, terminology, and dialect-sensitive content.
- A missing translation may fall back visibly to English. Never silently fabricate strings for legal, medical, safety, or financial content.
- Placeholders and message keys are code contracts: do not translate identifiers or remove interpolation fields.
Implementation Workflow
- Audit visible interface strings and extract them to stable locale keys.
- Define
en and yo dictionaries with explicit missing-key fallback; document which translation keys require review.
- Preserve Unicode composition, punctuation, placeholders, screen-reader language tags, and user-entered spelling.
- Validate locale switching without losing entered form values or navigation position.
- Test canonical Unicode equivalence, distinct tone-marked letters, JSON/API/database round trips, and missing translations.
- Check actual fonts, mobile layouts, keyboard support, and screen readers; seek fluent Yoruba approval before declaring localization complete.
Code Examples
See examples/localization.mjs for a runnable, dependency-free implementation. Example strings are illustrative, not a substitute for native-speaker review.
import { translate, sameNormalizedText } from './examples/localization.mjs';
translate('yo', 'welcome'); // 'Ẹ káàbọ̀'
translate('yo', 'logout'); // 'Log out' (English fallback)
sameNormalizedText('ẹ́', 'ẹ\u0301'); // true: canonically equivalent
sameNormalizedText('ẹ', 'e'); // false: different Yoruba letters
A web component can use <span lang="yo">Ẹ káàbọ̀</span> to identify the language without altering the source text. Use your platform's equivalent language metadata on mobile.
Run Regression Tests
From the ECC repository root:
node skills/yoruba-localization-testing/examples/localization.test.mjs
The test file covers six independent cases: Yoruba text, English, fallback, Unicode normalization, distinguishing tone/underdot differences, and JSON round trips. It uses only Node built-ins (Node 18+).
Anti-Patterns
text.normalize('NFD').replace(/\p{M}/gu, '') for display text: this destroys information.
- Replacing
ẹ with e, ọ with o, or ṣ with s.
- Assuming Yoruba speakers want a Yoruba-only UI, or translating programming identifiers.
- Shipping auto-generated Yoruba wording without review by a competent speaker.
- Marking localization complete after tests pass without checking font glyphs and assistive technologies.
Best Practices
- Keep translation fixtures in UTF-8 source files under version control.
- Verify
Intl locale behavior in target browsers/runtimes rather than assuming every environment supports yo equally.
- Make locale switching reversible, clearly labeled, and keyboard accessible.
- Provide a way to report problematic translations and record review status.
- Test mixed English/Yoruba sentences and longer content on real devices.
Related Skills
i18n-sync — locale keys and translation parity.
accessibility — screen readers and accessible interactions.
frontend-patterns — web UI patterns.
tdd-workflow — regression-driven implementation.
1---2name: yoruba-localization-testing3description: Test Yoruba (yo) and English bilingual interfaces for tone marks, underdots, Unicode normalization, translation fallback, and accessibility.4origin: ECC5metadata:6 source: https://skillmd.com/skills/affaan-m/yoruba-localization-testing7---89# Yoruba Localization Testing1011Use this skill when implementing or reviewing **Yoruba–English** interfaces. It targets correctness of Yoruba typography, message handling, and user experience, rather than providing automatically approved translations. It complements `i18n-sync` (message parity) and `accessibility` (assistive technology support).1213## When to Activate1415- Building web or mobile interfaces with `yo` or `en` locale options.16- Fixing misplaced, removed, or corrupted Yoruba diacritics in text, input, search, storage, or exports.17- Reviewing English fallbacks, language selection, localization regression tests, and screen-reader language metadata.18- Evaluating an AI-generated Yoruba translation before it is released to users.1920## Core Concepts2122- Yoruba includes distinct letters `ẹ`, `ọ`, `ṣ` and tone-marked vowels such as `á`, `à`, `ẹ́`, and `ọ̀`. Tone and underdot differences can change meaning.23- Store and transmit text in UTF-8. Normalize to NFC for canonical comparisons or consistent storage, but **do not** strip tones or underdots from the visible text.24- Prefer BCP 47 language tags `yo` and `en`. Set the screen-reader language for Yoruba text (for example, `lang="yo"` on web content), and verify the assistive technology's actual language support.25- Do not replace human review with machine translation. Require fluent Yoruba review for meaning, naturalness, tone, terminology, and dialect-sensitive content.26- A missing translation may fall back visibly to English. Never silently fabricate strings for legal, medical, safety, or financial content.27- Placeholders and message keys are code contracts: do not translate identifiers or remove interpolation fields.2829## Implementation Workflow30311. Audit visible interface strings and extract them to stable locale keys.322. Define `en` and `yo` dictionaries with explicit missing-key fallback; document which translation keys require review.333. Preserve Unicode composition, punctuation, placeholders, screen-reader language tags, and user-entered spelling.344. Validate locale switching without losing entered form values or navigation position.355. Test canonical Unicode equivalence, distinct tone-marked letters, JSON/API/database round trips, and missing translations.366. Check actual fonts, mobile layouts, keyboard support, and screen readers; seek fluent Yoruba approval before declaring localization complete.3738## Code Examples3940See [`examples/localization.mjs`](examples/localization.mjs) for a runnable, dependency-free implementation. Example strings are **illustrative**, not a substitute for native-speaker review.4142```javascript43import { translate, sameNormalizedText } from './examples/localization.mjs';4445translate('yo', 'welcome'); // 'Ẹ káàbọ̀'46translate('yo', 'logout'); // 'Log out' (English fallback)47sameNormalizedText('ẹ́', 'ẹ\u0301'); // true: canonically equivalent48sameNormalizedText('ẹ', 'e'); // false: different Yoruba letters49```5051A web component can use `<span lang="yo">Ẹ káàbọ̀</span>` to identify the language without altering the source text. Use your platform's equivalent language metadata on mobile.5253### Run Regression Tests5455From the ECC repository root:5657```sh58node skills/yoruba-localization-testing/examples/localization.test.mjs59```6061The test file covers six independent cases: Yoruba text, English, fallback, Unicode normalization, distinguishing tone/underdot differences, and JSON round trips. It uses only Node built-ins (Node 18+).6263## Anti-Patterns6465- `text.normalize('NFD').replace(/\p{M}/gu, '')` for display text: this destroys information.66- Replacing `ẹ` with `e`, `ọ` with `o`, or `ṣ` with `s`.67- Assuming Yoruba speakers want a Yoruba-only UI, or translating programming identifiers.68- Shipping auto-generated Yoruba wording without review by a competent speaker.69- Marking localization complete after tests pass without checking font glyphs and assistive technologies.7071## Best Practices7273- Keep translation fixtures in UTF-8 source files under version control.74- Verify `Intl` locale behavior in target browsers/runtimes rather than assuming every environment supports `yo` equally.75- Make locale switching reversible, clearly labeled, and keyboard accessible.76- Provide a way to report problematic translations and record review status.77- Test mixed English/Yoruba sentences and longer content on real devices.7879## Related Skills8081- `i18n-sync` — locale keys and translation parity.82- `accessibility` — screen readers and accessible interactions.83- `frontend-patterns` — web UI patterns.84- `tdd-workflow` — regression-driven implementation.