add i18n for console logs
This commit is contained in:
parent
b170a532f6
commit
7752585488
14 changed files with 77 additions and 31 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue