add i18n for console logs

This commit is contained in:
ari melody 2025-07-13 20:44:54 +01:00
parent b170a532f6
commit 7752585488
Signed by: ari
GPG key ID: CF99829C92678188
14 changed files with 77 additions and 31 deletions

View file

@ -1,3 +1,7 @@
import Lang from '$lib/lang';
const lang = Lang('en_GB');
import sound_log from '../sound/log.ogg';
import sound_hello from '../sound/hello.ogg';
import sound_success from '../sound/success.ogg';
@ -16,7 +20,7 @@ export function playSound(name) {
if (!name) name = "default";
const sound = sounds[name];
if (!sound) {
console.warn(`Attempted to play sound "${name}", which does not exist!`);
console.warn(lang.string('lang.sound_does_not_exist', name));
return;
}
sound.pause();