Add image loading

This commit is contained in:
Luca Bosin
2023-08-17 22:33:01 +02:00
parent ba42d6958a
commit d12462222f
19 changed files with 299 additions and 83 deletions

View File

@ -60,6 +60,7 @@ export const strf = derived(language, $language => {
* @param {...any} args
*/
function translate(translations, ...args) {
if (translations === undefined) return undefined;
if (typeof translations === 'string') return translations;
const str = translations[$language];
if (str === undefined) return translations.de;