import { validateMessageAudio } from '@datamoc/mw_games/i18n';
const catalog = {
locale: 'en', direction: 'ltr' as const,
messages: { 'hit.audio': '', 'loot.audio': { one: 'a.wav', other: 'b.wav' } },
};
console.log(validateMessageAudio(catalog).map((issue) => issue.key)); // ['hit.audio', 'loot.audio']
Structural problems in a catalog's sound cues: an
<type>.audioentry holding an empty string (the formatter already reads that as "no sound", so it is dead weight), or holding plural forms/a select message instead of a plain path. A sound path is data a game hands tomwg/audio'sSound, not grammar - count- or variant-dependent paths would silently reduce to one branch at lookup time rather than selecting one per play.